forked from Supositware/Haha-Yes
use the nickname of the member and don't send the status reply on messages
This commit is contained in:
parent
2f7c03e011
commit
5a6119bc42
1 changed files with 9 additions and 2 deletions
|
@ -24,9 +24,10 @@ export default {
|
|||
const member = args.user;
|
||||
const message = args.message;
|
||||
const attachment = args.image;
|
||||
const username = member.nickname ? member.nickname : member.user.username;
|
||||
|
||||
const webhook = await interaction.channel.createWebhook({
|
||||
name: member.user.username,
|
||||
name: username,
|
||||
avatar: member.user.displayAvatarURL(),
|
||||
reason: `Fakebot/user command triggered by: ${interaction.user.username}`,
|
||||
});
|
||||
|
@ -37,6 +38,12 @@ export default {
|
|||
await webhook.send({ content: message });
|
||||
}
|
||||
await webhook.delete(`Fakebot/user command triggered by: ${interaction.user.username}`);
|
||||
await interaction.editReply({ content: `Faked the user ${member}` });
|
||||
if (interaction.isMessage) {
|
||||
await interaction.delete();
|
||||
await interaction.deleteReply();
|
||||
}
|
||||
else {
|
||||
await interaction.editReply({ content: `Faked the user ${member}` });
|
||||
}
|
||||
},
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue