How do I listen for reactions on all messages in a channel?
doing discord bot dev after a long time. i wanted to listen for message reactions on every message in a channel and run a db query in the
run
function. but for some reason i can't even get a simple log to work rn. what am i doing wrong here?
Solution:
Do you have the GuildMessageReactions Intent enabled?
And that event only triggers on cached messages so you would also need to enable the partials for reaction and I believe message....
Solution
S
Stasium•409d ago
Do you have the GuildMessageReactions Intent enabled?
And that event only triggers on cached messages so you would also need to enable the partials for reaction and I believe message.
N
nexxel•409d ago
i think i do have it enabled
And that event only triggers on cached messages so you would also need to enable the partials for reaction and I believe message.what does this mean exactly?
S
Stasium•409d ago
cached messages are messages that has been sent after the bot is online, so once you restart the bot the previous messages are no longer cached
N
nexxel•409d ago
ah interesting
for this bot i def have to keep checking the reactions for old messages as well
is there a way to do that if the bot went offline for some time?
S
Stasium•409d ago
have a look at partials then
N
nexxel•409d ago
do you have a link to some kind of documentation or example?
oh wait is it just an intent
S
Stasium•409d ago
discordjs guide has an example
N
nexxel•409d ago
ah got it
thanks so much!
Welcome to the Sapphire Discord server! The next-gen object-oriented Discord.js bot framework can be found here.
2.2KMembers
View on DiscordWant results from more Discord servers?
More PostsMessageCreate Event isn't workingThis is the first listener Im creating I've read the documentation 50 times imo and checked out the How big is the difference between xyz.cache.get() and await xzy.fetch()?fetch returns the cached thing aswell if it exists, so except the Promise difference i see not reallNOT WORK SAPPHIREwhy not work bot commands?Throwing on unhandled interactionHey, I just wanted to quickly check this idea - If I assign a listener to interaction create and theReply During CooldownCan I make the bot reply with the remaining time of cooldown delay ?messageUpdate event not Triggering```ts
import { Listener } from '@sapphire/framework';
import type { Message } from 'discord.js';
exp'"discord.js"' has no exported member named 'WebhookEditMessageOptions'. Did you mean 'WebhookFetchMError: '"discord.js"' has no exported member named 'WebhookEditMessageOptions'. Did you mean 'WebhooMonoreposDoes Sapphire work and play nice with monorepos?Question regarding slash commands / aliasesHi, is there a way for me to register command aliases as slash commands as well?
For example:
Commandisable commands by dashboard.I want to disable commands through dashboard so, is there any way to dynamically disable commands ?What is the difference between response.status and response.statusCode ?When using the API Plugin of Sapphire.Hey what is DEVELOPMENT MODE and how do I disable itI tried setting the Node_Env to something else but it did not change it in the consoleBotList Autopost of stats is not workingI am using the bot list plugin
https://github.com/devtomio/sapphire-plugin-botlist
I set everything Miss matching objects on permission setting.Typescript says that permissionOverwrites does not exits in GuildBasedChannel, even tho it exists, irequiredClientPermissions check always rejectingWhile `requiredUserPermissions: ['ManageRoles']` works great. The client check `requiredClientPermisUnable to get member data from users that have left / kickedHi, I am trying to get data from members who have left the discord server or have been kicked. But ICatch all chat input command errors listenerHello ! I tried using the `Events.ChatInputCommandError` listener to catch any errors thrown by the Multiple Clients on one file/instanceI was wondering if its possible to run multiple clients on one file (i.e. .forEach()-ing `new ClientHow to present Slashcommands?How can I present the Slashcommands of my bot in his About Me like for example carl.gg does?Interaction HandlersAm I required to specify to sapphire where my interaction handlers directory is? A `interaction-hand