mirror of
https://github.com/toast-ts/Daggerbot-TS.git
synced 2024-11-17 04:10:59 -05:00
Support for Discord's new username system
This commit is contained in:
parent
baa7f8c6f8
commit
ff231d1f6e
@ -29,7 +29,7 @@ export default class userLevels extends Schema {
|
||||
} else if (userData.messages >= this.algorithm(userData.level+1)) {
|
||||
const newData = await this._content.findByIdAndUpdate(userid, {level:userData.level+1}, {new: true});
|
||||
const fetchUserSchema = await this._content.findById(userid);
|
||||
(this.client.channels.resolve(this.client.config.mainServer.channels.botcommands) as Discord.TextChannel).send({content: `${fetchUserSchema.notificationPing === true ? `<@${userid}>` : `**${(await this.client.users.fetch(userid)).username}**`} has reached level **${newData.level}**. GG!`, allowedMentions: {parse: ['users']}});
|
||||
(this.client.channels.resolve(this.client.config.mainServer.channels.botcommands) as Discord.TextChannel).send({content: `${fetchUserSchema.notificationPing === true ? `<@${userid}>` : `**${(await this.client.users.fetch(userid)).displayName}**`} has reached level **${newData.level}**. GG!`, allowedMentions: {parse: ['users']}});
|
||||
}
|
||||
} else await this._content.create({_id: userid, notificationPing: true, messages: 1, level: 0})
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user