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