Skip to content

Commit ca3aff1

Browse files
committed
Pretty
1 parent 6772d83 commit ca3aff1

File tree

2 files changed

+13
-12
lines changed

2 files changed

+13
-12
lines changed

src/db.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export async function getDB() {
2929
entities: [Rep, HelpThread, Snippet],
3030
...extraOpts,
3131
});
32-
await db.initialize()
32+
await db.initialize();
3333
console.log('Connected to DB');
3434
return db;
3535
}

src/modules/autorole.ts

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,25 @@ import { autorole, rolesChannelId } from '../env';
55
export async function autoroleModule({ client }: Bot) {
66
const channel = await client.channels.fetch(rolesChannelId);
77
if (!channel?.isTextBased()) {
8-
console.error(`Roles channel (${rolesChannelId}) does not exist or is not text based.`)
8+
console.error(
9+
`Roles channel (${rolesChannelId}) does not exist or is not text based.`,
10+
);
911
return;
1012
}
1113

1214
for (const ar of autorole) {
1315
const msg = await channel.messages.fetch(ar.msgID);
1416
if (!msg) {
15-
console.error(`Role message does not exist for ${ar.msgID}`)
17+
console.error(`Role message does not exist for ${ar.msgID}`);
1618
}
17-
await msg?.react(ar.emoji)
19+
await msg?.react(ar.emoji);
1820
}
1921

2022
client.channels.fetch(rolesChannelId).then(channel => {
21-
(channel as TextBasedChannel).messages.fetch()
22-
})
23+
(channel as TextBasedChannel).messages.fetch();
24+
});
2325

24-
25-
client.on("messageReactionAdd", async (reaction, user) => {
26+
client.on('messageReactionAdd', async (reaction, user) => {
2627
if (user.id == client.user.id) return;
2728
if (reaction.partial) await reaction.fetch();
2829
for (const ar of autorole) {
@@ -41,9 +42,9 @@ export async function autoroleModule({ client }: Bot) {
4142
await msg.react(reaction.emoji);
4243
}
4344
}
44-
})
45+
});
4546

46-
client.on("messageReactionRemove", async (reaction, user) => {
47+
client.on('messageReactionRemove', async (reaction, user) => {
4748
if (user.id == client.user.id) return;
4849
if (reaction.partial) await reaction.fetch();
4950
for (const ar of autorole) {
@@ -59,5 +60,5 @@ export async function autoroleModule({ client }: Bot) {
5960
await member.roles.remove(ar.roleID);
6061
console.log('Removed role', ar.roleID, 'from', member);
6162
}
62-
})
63-
}
63+
});
64+
}

0 commit comments

Comments
 (0)