Simpleboy353 / REAPER-2.0

A multi-purpose discord bot made using Discord.js V14. Includes Logging, Welcomer, Slash Commands, Menu based Help Command and so much more!
GNU General Public License v3.0
331 stars 226 forks source link

Сommands in chat via a prefix do not work #194

Closed makarasty closed 2 years ago

makarasty commented 2 years ago

To hide some errors, you can use the argument --trace-warning or --trace-warnings, but it does not solve the problem, the bot does not read the command files, so it does not respond to commands.

изображение

edited: splash commands work fine

изображение

strange but if you print out the client.commands, all the commands are there изображение

Simpleboy353 commented 2 years ago

Make sure you have the latest version of this bot (v14) and also make sure that the MESSAGE_CONTENT intent is enabled in developer portal (this is happened with me too when I was testing the update) and also thanx for the embed error report.

makarasty commented 2 years ago

Make sure you have the latest version of this bot (v14) and also make sure that the MESSAGE_CONTENT intent is enabled in developer portal (this is happened with me too when I was testing the update) and also thanx for the embed error report.

I have the latest version of discord.js installed изображение

Simpleboy353 commented 2 years ago

These packages will be removed in the coming updates. Have you checked the message intent?

makarasty commented 2 years ago

I just used the help command, Yes, it's on.

my opinion the error is that the bot can not find the command.enabled because it is undefined, as a solution you can try to set a value

Simpleboy353 commented 2 years ago

Screenshot_2022_0817_183420

Just check the intents bit value. It should same as in the ss. If it still doesn't work, instead of adding values in each command, just make it to check if command.enabled is undefined or not. Like:

if (command.enabled !== undefined || command.enabled !== "") { 
    // code
}

This is easier than adding value to each command imo.

makarasty commented 2 years ago

It's strange... изображение

Simpleboy353 commented 2 years ago

Try using the bot my mentioning the bot instead of using the prefix. Like @Bothelp. That will make sure whether the bot can access the message content or not

makarasty commented 2 years ago

it works! изображение Is this prefix bad? изображение

Simpleboy353 commented 2 years ago

So yes, its an issue with the message content. You bot is not able to access the message content. Can you show the intents bit number from the index.js file?

makarasty commented 2 years ago

I didn't change anything. const client = new Client({ allowedMentions: { parse: ["users", "roles"] }, intents: 47007 });

изображение

Simpleboy353 commented 2 years ago

i think the message content intent is not enabled

Simpleboy353 commented 2 years ago

thats all I can think of

makarasty commented 2 years ago

thats all I can think of

But изображение

Simpleboy353 commented 2 years ago

thats strange... it should work fine...

makarasty commented 2 years ago

Another bot on discord 12 works

makarasty commented 2 years ago

I'm waiting for a fix, but I don't understand what the problem is.

Simpleboy353 commented 2 years ago

find the intent bit value that suits your bot: https://discord-intents-calculator.vercel.app/

makarasty commented 2 years ago

find the intent bit value that suits your bot: https://discord-intents-calculator.vercel.app/

I changed this value to 3276799, it did nothing

Simpleboy353 commented 2 years ago

last thing i can say... try using a different bot

makarasty commented 2 years ago

The other bot works изображение

Simpleboy353 commented 2 years ago

i guess the previous bot didn't like the code....

makarasty commented 2 years ago

i guess the previous bot didn't like the code....

I'm interested in your bot, it's great

Simpleboy353 commented 2 years ago

dont know what is wrong..... why it isnt working.....

makarasty commented 2 years ago

dont know what is wrong..... why it isnt working.....

I must be cursed, not a single bot I tried to use does not work properly 😞

Simpleboy353 commented 2 years ago

try using the code on a different bot ( a different bot on developer portal) .. and enable the intents (all of them) and try using the code with that.. that might work

makarasty commented 2 years ago

try using the code on a different bot ( a different bot on developer portal) .. and enable the intents (all of them) and try using the code with that.. that might work

I tried changing the bot's token to a different one, but it did nothing. ScreenShot_20220817170928

Simpleboy353 commented 2 years ago

okay, lets try this: use the intent flags instead of bit value...

const client = new Client({
  allowedMentions: { parse: ["users", "roles"] },
  intents: [
    GatewayIntentBits.Guilds,
    GatewayIntentBits.GuildMessages,
    GatewayIntentBits.GuildBans,
    GatewayIntentBits.GuildsVoiceStates,
    GatewayIntentBits.GuildMembers,
    GatewayIntentBits.GuildPresences,
    GatewayIntentBits.MessageContent,
    GatewayIntentBits.GuildWebhooks,
    GatewayIntentBits.GuildMessageReactions
  ]
});
makarasty commented 2 years ago

okay, lets try this: use the intent flags instead of bit value...

const client = new Client({
  allowedMentions: { parse: ["users", "roles"] },
  intents: 47007
});

It didn't give any results, I think we're looking in the wrong place

Simpleboy353 commented 2 years ago

okay, lets try this: use the intent flags instead of bit value...

const client = new Client({
  allowedMentions: { parse: ["users", "roles"] },
  intents: 47007
});

It didn't give any results, I think we're looking in the wrong place

just updated the message

makarasty commented 2 years ago

I changed GatewayIntentBits.GuildsVoiceStates, to GatewayIntentBits.GuildVoiceStates Because it didn't work

but the error is the same

makarasty commented 2 years ago

The bot sees the messages изображение

Simpleboy353 commented 2 years ago

bruh.. change the prefix to ! or any else

makarasty commented 2 years ago

maybe the problem is in these lines because they cannot measure the command.enabled изображение

makarasty commented 2 years ago

😲😲😲😲😲😲😲😲😲😲😲😲😲😲😲 изображение

Simpleboy353 commented 2 years ago

lol... im dumb af... im done

makarasty commented 2 years ago

it seems that the bot just does not know how to work with other prefixes

Simpleboy353 commented 2 years ago

Screenshot (85)

i dont think so

makarasty commented 2 years ago

But the other prefixes don't work for me

Simpleboy353 commented 2 years ago

please edit the command.js file... refer to this... this should fix the prefix issue

makarasty commented 2 years ago

IT WORKS 😳

makarasty commented 2 years ago

Thanks dude, you're the best.

Simpleboy353 commented 2 years ago

Thanks dude, you're the best.

np broo... enjoy your bot :heart:

Simpleboy353 commented 2 years ago

also i forgot to mention, activity commands arent working for now as the package hasnt been update to use djs v14. I'll wait a week or two, if gets the update, its fine else i'll update the code...