mirror of
https://github.com/Art-Portal/April.git
synced 2024-12-26 19:34:28 +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){
|
if (guild.id==guildId){
|
||||||
const channel = await guild.channels.cache.find(c => c.id == generalChannelId );
|
const channel = await guild.channels.cache.find(c => c.id == generalChannelId );
|
||||||
try{
|
try{
|
||||||
const welcomesticker = await guild.stickers.fetch('985933707317743666')
|
const welcomesticker = await guild.stickers.fetch('985933707317743666');
|
||||||
const message = await channel.send({ content: welcomemessage.replace("[memberid]", member.id), stickers:[welcomesticker]});
|
const message = await channel.send({ content: welcomemessage.replace("[memberid]", member.id), stickers: welcomesticker.available ? [welcomesticker] : []});
|
||||||
Promise.all([
|
Promise.all([
|
||||||
message.react('👋'),
|
message.react('👋'),
|
||||||
]).catch(error => console.error(error))
|
]).catch(error => console.error(error))
|
||||||
|
Loading…
Reference in New Issue
Block a user