fix(?) the nickname
This commit is contained in:
parent
35378dfa07
commit
868779edf7
1 changed files with 5 additions and 2 deletions
|
@ -36,13 +36,16 @@ class fakebotCommand extends Command {
|
|||
let Attachment = (message.attachments).array();
|
||||
let url;
|
||||
let username = args.user.username;
|
||||
let member = message.guild.members.get(args.user.id);
|
||||
// Get attachment link
|
||||
if (Attachment[0]) {
|
||||
url = Attachment[0].url;
|
||||
}
|
||||
// Show nickname if user is in guild
|
||||
if (message.guild.members.get(args.user.id).nickname) {
|
||||
username = message.guild.members.get(args.user.id).nickname;
|
||||
if (member) {
|
||||
if (member.nickname) {
|
||||
username = member.nickname;
|
||||
}
|
||||
}
|
||||
|
||||
message.channel.createWebhook(username, {
|
||||
|
|
Loading…
Reference in a new issue