diff options
author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-10-26 20:07:19 -0400 |
---|---|---|
committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-10-26 20:07:19 -0400 |
commit | ed59b7f1827ab93573b079144c3eeaa01ce40492 (patch) | |
tree | 7ceac6d61a8a25586ab9bbaf7acfbade91c97132 /src/listeners/guild | |
parent | c0a81b014a56e4d44c826f78391a930361aab122 (diff) | |
download | tanzanite-ed59b7f1827ab93573b079144c3eeaa01ce40492.tar.gz tanzanite-ed59b7f1827ab93573b079144c3eeaa01ce40492.tar.bz2 tanzanite-ed59b7f1827ab93573b079144c3eeaa01ce40492.zip |
clean up, bug fixes
Diffstat (limited to 'src/listeners/guild')
-rw-r--r-- | src/listeners/guild/guildCreate.ts | 2 | ||||
-rw-r--r-- | src/listeners/guild/guildMemberAdd.ts | 6 | ||||
-rw-r--r-- | src/listeners/guild/guildMemberRemove.ts | 6 | ||||
-rw-r--r-- | src/listeners/guild/syncUnban.ts | 2 |
4 files changed, 8 insertions, 8 deletions
diff --git a/src/listeners/guild/guildCreate.ts b/src/listeners/guild/guildCreate.ts index 62149c3..68e9216 100644 --- a/src/listeners/guild/guildCreate.ts +++ b/src/listeners/guild/guildCreate.ts @@ -9,7 +9,7 @@ export default class GuildCreateListener extends BushListener { }); } - public override async exec(...[guild]: BushClientEvents['guildCreate']): Promise<void> { + public override async exec(...[guild]: BushClientEvents['guildCreate']) { void client.console.info( 'guildCreate', `Joined <<${guild.name}>> with <<${guild.memberCount?.toLocaleString()}>> members.` diff --git a/src/listeners/guild/guildMemberAdd.ts b/src/listeners/guild/guildMemberAdd.ts index 867101b..2b964f4 100644 --- a/src/listeners/guild/guildMemberAdd.ts +++ b/src/listeners/guild/guildMemberAdd.ts @@ -10,12 +10,12 @@ export default class GuildMemberAddListener extends BushListener { }); } - public override async exec(...[member]: BushClientEvents['guildMemberAdd']): Promise<void> { + public override async exec(...[member]: BushClientEvents['guildMemberAdd']) { void this.sendWelcomeMessage(member); void this.joinAndStickyRoles(member); } - public async sendWelcomeMessage(member: BushGuildMember): Promise<void> { + public async sendWelcomeMessage(member: BushGuildMember) { if (client.config.isDevelopment) return; const welcomeChannel = await member.guild.getSetting('welcomeChannel'); if (!welcomeChannel) return; @@ -45,7 +45,7 @@ export default class GuildMemberAddListener extends BushListener { ); } - public async joinAndStickyRoles(member: BushGuildMember): Promise<void> { + public async joinAndStickyRoles(member: BushGuildMember) { if (client.config.isDevelopment) return; if (await member.guild.hasFeature('stickyRoles')) { const hadRoles = await StickyRole.findOne({ where: { guild: member.guild.id, user: member.id } }); diff --git a/src/listeners/guild/guildMemberRemove.ts b/src/listeners/guild/guildMemberRemove.ts index ff8d2ac..57ed5ce 100644 --- a/src/listeners/guild/guildMemberRemove.ts +++ b/src/listeners/guild/guildMemberRemove.ts @@ -10,12 +10,12 @@ export default class GuildMemberRemoveListener extends BushListener { }); } - public override async exec(...[member]: BushClientEvents['guildMemberRemove']): Promise<void> { + public override async exec(...[member]: BushClientEvents['guildMemberRemove']) { void this.sendWelcomeMessage(member); void this.stickyRoles(member); } - public async sendWelcomeMessage(member: BushGuildMember | PartialBushGuildMember): Promise<void> { + public async sendWelcomeMessage(member: BushGuildMember | PartialBushGuildMember) { if (client.config.isDevelopment) return; const user = member.partial ? await client.users.fetch(member.id) : member.user; await util.sleep(0.05); // ban usually triggers after member leave @@ -47,7 +47,7 @@ export default class GuildMemberRemoveListener extends BushListener { ); } - public async stickyRoles(member: BushGuildMember | PartialBushGuildMember): Promise<void> { + public async stickyRoles(member: BushGuildMember | PartialBushGuildMember) { if (!(await member.guild.hasFeature('stickyRoles'))) return; if (member.partial) { await member.guild.members.fetch(); // try to prevent in the future diff --git a/src/listeners/guild/syncUnban.ts b/src/listeners/guild/syncUnban.ts index 48f068f..db654b8 100644 --- a/src/listeners/guild/syncUnban.ts +++ b/src/listeners/guild/syncUnban.ts @@ -9,7 +9,7 @@ export default class SyncUnbanListener extends BushListener { }); } - public override async exec(...[ban]: BushClientEvents['guildBanRemove']): Promise<void> { + public override async exec(...[ban]: BushClientEvents['guildBanRemove']) { const bans = await ActivePunishment.findAll({ where: { user: ban.user.id, |