Comments (3)
Oh i forgot the most important part lol the command:
const { EmbedBuilder, ButtonBuilder, ActionRowBuilder, ButtonStyle, ChannelType } = require('discord.js')
const { channel, author, content } = (message)
if (channel.type === ChannelType.DM){
const openticket = new ButtonBuilder()
.setCustomId('openticket')
.setLabel('🎟️ Open Modmail Ticket')
.setStyle(ButtonStyle.Danger)
const row69 = new ActionRowBuilder()
.addComponents(openticket)
const embed69 = new EmbedBuilder()
.setTitle('FrankyBotv2 Modmail')
.setColor('DarkBlue')
.setDescription(`Welcome, <@${message.author.id}>! You can use this menu to contact the staff members of the server. You may use this menu to report people or ask questions from the moderators. 👍\n**Please note that abusing this feature will lead to punishment**`)
.setFooter({text:'Click the button below to open a ticket!'})
channel.send({embeds: [embed69], components: [row69]})}}}
I removed the button linking part here just because i had a doubt about it
from discordbot-template.
On reading your error, it is clear that the error is in slashCreate.js, it appears to me that it is a modified slashCreate file.
The error is in line 27 (which you have created a custom cooldown system):
if (!cooldowns.has(command.data.name)) {
command
is undefined. It appears to me that you have added the cooldown command section (or do I say, copy pasted) at wrong place. The original slash file is checking whether it is a slash interaction or not. Please run your cooldown system AFTER verification of interaction. That should fix your issue.
from discordbot-template.
On a side note, I will be removing the bug label because it is not a bug on the template end. Feel free to reach out to us on discord if you want further help! https://discord.gg/N7AJFYf8EP
from discordbot-template.
Related Issues (13)
- [BUG] Select-Menus don't work HOT 4
- Suggestion: Add sharding HOT 4
- [HELP] Unwanted Slash Interactions Visible HOT 25
- [BUG] The optional field in the help slash command is useless HOT 8
- [BUG] START BOT HOT 4
- [HELP] command permissions HOT 5
- [BUG] guildMemberUpdate not emitting HOT 2
- [BUG] guildMemberAdd not emitting HOT 1
- Slash Commands Permissions HOT 2
- [BUG] Slash commands are not loading. HOT 7
- Add Mongo Support HOT 1
- [BUG] Issue utilising trigger based commands when multiple exist HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from discordbot-template.