mirror of
https://github.com/toast-ts/Daggerbot-TS.git
synced 2024-11-17 04:10:59 -05:00
Remove useless await and tidy up embed builder
This commit is contained in:
parent
b696d39b16
commit
0850bf038a
@ -6,15 +6,14 @@ export default {
|
|||||||
const member = interaction.options.getMember('member') as Discord.GuildMember;
|
const member = interaction.options.getMember('member') as Discord.GuildMember;
|
||||||
const reason = interaction.options.getString('reason');
|
const reason = interaction.options.getString('reason');
|
||||||
const adminPerm = member.permissions.has('Administrator');
|
const adminPerm = member.permissions.has('Administrator');
|
||||||
|
|
||||||
if (adminPerm) return interaction.reply('You cannot bonk an admin!');
|
if (adminPerm) return interaction.reply('You cannot bonk an admin!');
|
||||||
|
|
||||||
await client.bonkCount._incrementUser(member.id).forceSave();
|
client.bonkCount._incrementUser(member.id).forceSave();
|
||||||
const embed = new client.embed().setColor(client.config.embedColor)
|
interaction.reply({embeds: [new client.embed().setColor(client.config.embedColor)
|
||||||
.setDescription(`> <@${member.id}> has been bonked!\n${reason?.length == null ? '' : `> Reason: **${reason}**`}`)
|
.setDescription(`> <@${member.id}> has been bonked!\n${reason?.length == null ? '' : `> Reason: **${reason}**`}`)
|
||||||
.setImage('https://media.tenor.com/7tRddlNUNNcAAAAd/hammer-on-head-minions.gif')
|
.setImage('https://media.tenor.com/7tRddlNUNNcAAAAd/hammer-on-head-minions.gif')
|
||||||
.setFooter({text: `Bonk count for ${member.user.tag}: ${await client.bonkCount.getUser(member.id).toLocaleString('en-US')}`})
|
.setFooter({text: `Bonk count for ${member.user.tag}: ${client.bonkCount.getUser(member.id).toLocaleString('en-US')}`})
|
||||||
interaction.reply({embeds: [embed]});
|
]})
|
||||||
},
|
},
|
||||||
data: new SlashCommandBuilder()
|
data: new SlashCommandBuilder()
|
||||||
.setName('bonk')
|
.setName('bonk')
|
||||||
|
Loading…
Reference in New Issue
Block a user