mirror of
https://github.com/Art-Portal/April.git
synced 2025-01-27 13:23:54 +01:00
Avoid sending welcome sticker if unavailable
This commit is contained in:
parent
47a1cfcce3
commit
c24626b0f0
@ -7,8 +7,8 @@ module.exports = {
|
||||
if (guild.id==guildId){
|
||||
const channel = await guild.channels.cache.find(c => c.id == generalChannelId );
|
||||
try{
|
||||
const welcomesticker = await guild.stickers.fetch('985933707317743666')
|
||||
const message = await channel.send({ content: welcomemessage.replace("[memberid]", member.id), stickers:[welcomesticker]});
|
||||
const welcomesticker = await guild.stickers.fetch('985933707317743666');
|
||||
const message = await channel.send({ content: welcomemessage.replace("[memberid]", member.id), stickers: welcomesticker.available ? [welcomesticker] : []});
|
||||
Promise.all([
|
||||
message.react('👋'),
|
||||
]).catch(error => console.error(error))
|
||||
|
Loading…
x
Reference in New Issue
Block a user