mirror of
https://github.com/toast-ts/Daggerbot-TS.git
synced 2024-11-17 16:30:58 -05:00
Fix possible absence of GuildMember
This commit is contained in:
parent
8652fc937b
commit
d8c271e4ce
@ -4,7 +4,7 @@ export default {
|
|||||||
run(client: TClient, interaction: Discord.ChatInputCommandInteraction<'cached'>){
|
run(client: TClient, interaction: Discord.ChatInputCommandInteraction<'cached'>){
|
||||||
interaction.reply({embeds: [new client.embed().setColor(client.config.embedColor).setTitle('Daggerbot contributors').setDescription([
|
interaction.reply({embeds: [new client.embed().setColor(client.config.embedColor).setTitle('Daggerbot contributors').setDescription([
|
||||||
'**Thanks to those below that contributed to/developed the bot!**',
|
'**Thanks to those below that contributed to/developed the bot!**',
|
||||||
`${client.config.whitelist.map(id=>{const member = interaction.guild.members.cache.get(id) as Discord.GuildMember; return `${member.user.username} <@${id}>`}).join('\n')}`
|
client.config.whitelist.map(id=>{const member = interaction.guild.members.cache.get(id); return `${member?.user?.username ?? 'N/A'} <@${id}>`}).join('\n')
|
||||||
].join('\n'))]})
|
].join('\n'))]})
|
||||||
},
|
},
|
||||||
data: new SlashCommandBuilder()
|
data: new SlashCommandBuilder()
|
||||||
|
Loading…
Reference in New Issue
Block a user