I would like to make my bot commands to show up when a user types / but I got this console error

Traceback (most recent call last):
File “main.py”, line 8, in
from discord_slash import SlashCommand
ModuleNotFoundError: No module named ‘discord_slash’

my discord bot: https://replit.com/@HOLDULV/Bota-Apex-mutitask#main.py

Don’t use discord slash, use @discord.tree.command() decorator.

3 Likes

oh ok then ill try to see if it fixed the error

wait where should i make the changes like where should i add @discord.tree.command()

Actually, just replace @client.command with @client.hybrid_command. And remove all discord slash imports.

2 Likes

oh ok thanks for replying

1 Like

thanks for the help the bot is running with no errors.
i change the @client.hybrid_command back to @client.command as i could not see what difference it made

1 Like

Hybrid commands makes have a slash command and a normal command. Commands just makes it a normal command. Note: Did you mean app command or a command with a slash prefix.

1 Like

wdym at the end
…sorry

Or the normal commands, with a slash prefix, as your bot is configured for.

1 Like

Well when i use @client.hybrid_command then my commands does not show up in the commands tab or what elles it called

afk got to bed…, im sleeping sorry but im afk

1 Like

Ah, at the end of on_ready add this:

await bot.tree.sync()

You need to sync it for it to appear.

3 Likes

oh ok thanks for you helping and kindness

2 Likes

how do i make my bot run forever like run 24/7

The is not really possible in replit, but you can simulate it by buying always on, or use a pinger for free, although it eats egress.

2 Likes

what do you mean? I don’t know what “egress” is.

1 Like

it does not use a lot of egress

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.