Skip to content
Advertisement

Tag: discord.js

How to make a bot edit its own message on Discord

My friend wrote this amazing code for me but it doesn’t seem to work. It’s meant to send a message on a command then edit the message over and over again. But when I run the code my terminal says DiscordAPIError: Cannot edit a message authored by another user method: ‘patch’, path: ‘/channels/808300406073065483/messages/811398346853318668’, code: 50005, httpStatus: 403 Is there a

Send a message if there is a role Discord.js

Bot send a message if the User who clicked the reaction has the ROLE “ID” I decided to try this, but it didn’t work out ====Here is the main Code==== Answer You should check the role of the member who reacted (the member found in reaction.users.cache). reaction.users.cache returns a user, and you need a guild member to get their roles.

How can I delete a message after sending it?

I have a code that sends a message when a member joins the guild and I want to shortly delete it afterwards. My code: I tried embed.delete or just the classic msg.delete but it doesn’t work as I can/don’t know how to define “msg” as the last msg the bot has sent. Answer kanal.send(embed) returns a promise. You can use

Slowmode command

When I type ;sm, my bot responds with: “You need to specify a time in seconds” <– Thats okay. But when I type ;sm [time], it still responds with: “You need to specify a time in seconds.”, but it should set the rate limit and tell me that “Slowmode is now [time]s”. Here’s my code: Answer First, make sure you

Advertisement