mirror of
https://github.com/toast-ts/Daggerbot-TS.git
synced 2024-11-17 12:21:00 -05:00
Remove reaction-related events
This commit is contained in:
parent
1510d8d5c6
commit
c5101717e5
@ -47,11 +47,10 @@ export default class TClient extends Discord.Client {
|
||||
intents: [
|
||||
Discord.GatewayIntentBits.Guilds, Discord.GatewayIntentBits.GuildMembers,
|
||||
Discord.GatewayIntentBits.GuildModeration, Discord.GatewayIntentBits.GuildInvites,
|
||||
Discord.GatewayIntentBits.GuildMessageReactions, Discord.GatewayIntentBits.GuildPresences,
|
||||
Discord.GatewayIntentBits.MessageContent, Discord.GatewayIntentBits.GuildMessages,
|
||||
Discord.GatewayIntentBits.DirectMessages
|
||||
Discord.GatewayIntentBits.GuildPresences, Discord.GatewayIntentBits.MessageContent,
|
||||
Discord.GatewayIntentBits.GuildMessages, Discord.GatewayIntentBits.DirectMessages
|
||||
], partials: [
|
||||
Discord.Partials.Channel, Discord.Partials.Reaction, Discord.Partials.Message
|
||||
Discord.Partials.Channel, Discord.Partials.Message
|
||||
], allowedMentions: {users:[], roles:[]}
|
||||
})
|
||||
this.config = ConfigHelper.loadConfig() as Config;
|
||||
|
@ -1,11 +0,0 @@
|
||||
import Discord from 'discord.js';
|
||||
import TClient from '../client.js';
|
||||
export default class MessageReactionAdd {
|
||||
static run(client:TClient, reaction:Discord.MessageReaction, user:Discord.User){
|
||||
if (!client.config.botSwitches.logs) return;
|
||||
if (reaction.message.guildId != client.config.dcServer.id || reaction.message.partial) return;
|
||||
const ReactedFirst = reaction.users.cache.first();
|
||||
if (ReactedFirst.id != user.id) return;
|
||||
if (reaction.emoji.name === '🖕') return (client.channels.cache.get(client.config.dcServer.channels.logs) as Discord.TextChannel).send({embeds:[new client.embed().setColor(client.config.embedColorYellow).setTimestamp().setAuthor({name: `Author: ${ReactedFirst.username} (${ReactedFirst.id})`, iconURL: ReactedFirst.displayAvatarURL()}).setTitle('Message reaction').setDescription(`<@${ReactedFirst.id}>\nAdded a reaction to the message.\n**Emoji**\n${reaction.emoji.name}\n**Channel**\n<#${reaction.message.channelId}>`).setFooter({text: 'Possibly this member, bot fetches who reacted first.'})], components: [new Discord.ActionRowBuilder<Discord.ButtonBuilder>().addComponents(new Discord.ButtonBuilder().setStyle(5).setURL(`${reaction.message.url}`).setLabel('Jump to message'))]});
|
||||
}
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
import Discord from 'discord.js';
|
||||
import TClient from '../client.js';
|
||||
export default class MessageReactionRemove {
|
||||
static run(client:TClient, reaction:Discord.MessageReaction, user:Discord.User){
|
||||
if (!client.config.botSwitches.logs || reaction.message.guildId != client.config.dcServer.id || reaction.message.partial) return;
|
||||
if (reaction.emoji.name === '🖕') return (client.channels.cache.get(client.config.dcServer.channels.logs) as Discord.TextChannel).send({embeds:[new client.embed().setColor(client.config.embedColorRed).setTimestamp().setAuthor({name: `Author: ${user.username} (${user.id})`, iconURL: user.displayAvatarURL()}).setTitle('Message reaction').setDescription(`<@${user.id}>\nRemoved a reaction from the message.\n**Emoji**\n${reaction.emoji.name}\n**Channel**\n<#${reaction.message.channelId}>`)]})
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user