Here’s the situation: In my server I have a bot (not mine) that replies to specific user actions with a message containing an embed that has the word “Done!” in the description. I want to set it up so that once this bot sends the “Done!” message the user it replied to receives a role. Today being the first day
Tag: discord.js
Refactoring Embed message generation for Discord Bot
I am trying to refactor the code that I am using to generate embeds (user input makes an API call for info, which I display through the embed) with my bot in Discord. I have both a slash command and prefix command version of the code (so that people can either ask the bot with a prefix command or use
Discord.js v13 code breaks when upgrading to v14
I’ve just updated my discord.js from v13 to v14 and there are many errors. Errors with intents: Errors with interactions: Errors with channels: Errors with builders and embeds: Errors with enums: Answer Discord.js v14 includes many breaking changes. It now requires Node 16.9 or higher to use, so make sure you upgrade to the latest LTS version. This version of
How to make the bot not said the language code?
I’m trying to code discord tts bot but I run into a problem. When I used $speak en Hi guys the bot said “en hi guys”. I tried making the bot not say the language code but I can’t so if you have any solution please share it with me. Here is my code: Answer You will need to remove
How to check if the mentioned participant has rights Discord.js
I’m trying to check if the mentioned member has admin rights, but I only know the option with the author of the post Is there another option? Answer I’m not entirely sure but if your issue is checking to see if they have admin or finding that was mentioned, but just for checking to see if they have admin you
Discord Embed Command Cooldown
im trying to create a cooldown for my status command, because they spam a lot on the server the status command and i want a cooldown like 5m and that send a message like, “you need to wait 5m more to use this command im really newbie to javascript, so if anyone can help me Here its my entire command:
How to check in an interaval if x time has passed since the creation of a channel in discord.js?
I’ve been having some hard time writing this and I searched a lot for any similar questions but didn’t find any. So I have this Schema: And I want to automatically delete the channel after x time of its creation, the Time is saved as <channel>.createdTimestamp And here is the condition of the event: So as I said I just
Modal Collector Discord.js
I was trying to create a collector for my modal using Discord.js. With the code below I don’t get an error, but the modal fails in Discord and the code in collector.on never runs. I have used a similar approach to be able to create a button collector by replaycing the compententType: with “BUTTON”, which runs perfectly fine. I am
Sequelize table is not created, even though I used Sequelize.define()
Repository (code): https://github.com/JavascriptLearner815/spelta-discord-bot/tree/development I am creating a Discord bot with Discord.js. I wanted to add three DM commands for the bot: dm, reply, and followup. In order to reply to the last DM, I needed to use SQLITE. I made and required a database.js file to do that, using the discord.js guide for SQLite. But when I run the command
SyntaxError: /home/container/config.json: Unexpected token } in JSON at position 2769
Im getting this SyntaxError: /home/container/config.json: Unexpected token } in JSON at position 2769 error, here’s my config.json Can someone please help me fix this I am pretty sure I am supposed to add a : but i dont know how to fix this syntax error I dont understand what is wrong, using node v16 Answer You can use any online