#I need a help with a multipurpose bot

72 messages · Page 1 of 1 (latest)

edgy hound
#

I'm tired of this porblem now

novel mirageBOT
#
  • Consider reading #how-to-get-help to improve your question!
  • Explain what exactly your issue is.
  • Post the full error stack trace, not just the top part!
  • Show your code!
  • Issue solved? Press the button!
wary idol
#

this error is self explanatory

edgy hound
#

And where to do

wary idol
#

look at the error and see what it says

Please try re-compiling or re-installing the module (for instance, using npm rebuild or npm install).

#

those are commands you would run in the terminal

edgy hound
edgy hound
#

@wary idol ty it worked

#

But new problem arised

#

The button and the commands r not working

#

Showing

#

This is the prob

chilly gorge
#

What does the console show now?

edgy hound
#

And there is almost no error in the console

#

Some in the middle i got this error

long steeple
novel mirageBOT
edgy hound
#

Use v14.11.0 or newer of discord.js: `` (more: #1091094485754187907 message )

#

@long steeple thank you bro

#

It is working now

edgy hound
#

The webhook token in given

#

But still it's giving problem

#

The token is correct

#

I check thrice and the token is correct

#

Still it give this problem

long steeple
#

Show your code?

edgy hound
chilly gorge
#

Why do you make another WebhookClient there, you have your logged in client there and could just get the webhook from that. Besides the error log webhook you use there clearly shows you know how to correctly do it

edgy hound
#

Plis

#

Cut that part and paste in paste bin then gimme the link

chilly gorge
edgy hound
chilly gorge
#

Do you know what a webhook is and does? Do you want to fully remove it?

edgy hound
#

@chilly gorge

#

New error suddenly arised idk from where

haughty carbonBOT
#

Common causes of DiscordAPIError[10062]: Unknown interaction:

  • Initial response took more than 3 seconds ➞ defer the response *.
  • Wrong interaction object inside a collector.
  • Two processes handling the same command (the first consumes the interaction, so it won't be valid for the other instance)
    * Note: you cannot defer modal or autocomplete value responses
edgy hound
#

@chilly gorge I solved that webhook error

#

Can u help me with

#

This error

chilly gorge
#

#rules 5, stop pinging me with new issues

edgy hound
#

I haven't noticed it

edgy hound
#

Ah, no one helping me

chilly gorge
#

Did you write that code yourself?

edgy hound
chilly gorge
#

Then ask whoever did. We are not 3rd party support

edgy hound
#

🥲

haughty carbonBOT
#

Please add the following code to your code base outside of any other event listeners and provide the full log output relevant to your issue.

client
    .on("debug", console.log)
    .on("warn", console.log)
  • Note: if you initialize your Client as bot or other identifiers you need to use these instead of client
  • If the output is too long to post consider using a bin instead: gist | paste.gg | sourceb.in | hastebin
chilly gorge
# edgy hound That guy died 3 months ago

Sorry to hear that. You‘ll have a lot to learn if you plan to actually continue working on their code then though… might be easier to start over if you don’t know what each thing in their code does

edgy hound
#

Hm

edgy hound
#
const Discord = require('discord.js');
const Canvacord = require("canvacord");

const Functions = require("../../database/models/functions");
const Schema = require("../../database/models/levels");

module.exports = async (client, interaction, args) => {
    const data = await Functions.findOne({ Guild: interaction.guild.id });

    if (data && data.Levels == true) {
        const target = interaction.options.getUser('user') || interaction.user;
        const user = await client.fetchLevels(target.id, interaction.guild.id);
        if(!user || !user.xp) return client.errNormal({
            error: "This user has no levels!",
            type: 'editreply'
        }, interaction);
        let xpRequired = client.xpFor(user.level + 1);

        const rankCard = new Canvacord.Rank()
            .setAvatar(target.displayAvatarURL({ dynamic: false, extension: 'png' }))
            .setRequiredXP(xpRequired)
            .setCurrentXP(user.xp)
            .setLevel(user.level)
            .setProgressBar(client.config.colors.normal, "COLOR")
            .setUsername(target.username)
          
            .setStatus("dnd")
            .setRank(user.position)

        rankCard.build()
            .then(data => {
                const attachment = new Discord.AttachmentBuilder(data, { name: "RankCard.png" });
                interaction.editReply({ files: [attachment] });
            });
    }
    else {
        client.errNormal({
            error: "Levels are disabled in this guild!",
            type: 'editreply'
        }, interaction);
    }
}

This is my rank command

#

But the problem is this...

chilly gorge
#

Ask canvacord (and read their docs)

edgy hound
#

Ok

#

...

chilly gorge
#

Probably that version was made before new username system existed

#

But seriously, do you feel up to the task to fix that code you didn’t write yourself?

edgy hound
#

If persons like u help me then i may be able to succeed

chilly gorge
edgy hound