GithubHelp home page GithubHelp logo

[BUG] Button issue about discordbot-template HOT 3 CLOSED

ODHG1 avatar ODHG1 commented on May 18, 2024
[BUG] Button issue

from discordbot-template.

Comments (3)

ODHG1 avatar ODHG1 commented on May 18, 2024

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.

NamVr avatar NamVr commented on May 18, 2024

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.

NamVr avatar NamVr commented on May 18, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.