Update filter to check for embeds
This commit is contained in:
parent
e3ed133830
commit
077bb6c1b2
@ -531,7 +531,9 @@ const functions = {
|
|||||||
const guild = await client.guilds.fetch(guildInfo.guildId);
|
const guild = await client.guilds.fetch(guildInfo.guildId);
|
||||||
// console.log(guildInfo instanceof GuildInfo);
|
// console.log(guildInfo instanceof GuildInfo);
|
||||||
const channel = await guild.channels.fetch(guildInfo.watchChannelId);
|
const channel = await guild.channels.fetch(guildInfo.watchChannelId);
|
||||||
const filter = message => message.author.id != process.env.BOTID;
|
const filter = message => {
|
||||||
|
return message.author.id != process.env.BOTID && message.embeds != undefined;
|
||||||
|
}
|
||||||
const collector = channel.createMessageCollector({ filter });
|
const collector = channel.createMessageCollector({ filter });
|
||||||
collector.on('collect', message => {
|
collector.on('collect', message => {
|
||||||
if (message.embeds.length == 0) return;
|
if (message.embeds.length == 0) return;
|
||||||
|
Loading…
Reference in New Issue
Block a user