Make it work with group DM
This commit is contained in:
parent
ddaa2e6325
commit
78c4935614
@ -219,9 +219,11 @@ class Bot {
|
||||
}
|
||||
|
||||
static getDiscordNicknameOnServer(user, guild) {
|
||||
const userDetails = guild.members.get(user.id);
|
||||
if (userDetails) {
|
||||
return userDetails.nickname || user.username;
|
||||
if (guild) {
|
||||
const userDetails = guild.members.get(user.id);
|
||||
if (userDetails) {
|
||||
return userDetails.nickname || user.username;
|
||||
}
|
||||
}
|
||||
return user.username;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user