Update filter to check for embeds

This commit is contained in:
Skylar Grant 2023-02-12 10:57:28 -05:00 committed by GitHub
parent e3ed133830
commit 077bb6c1b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -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;