Closed V3ntus closed 2 years ago
I too face this same issue and have removed all of my code down to specifically the init of the client object, and calling start.
bot = interactions.Client(token=get_token(), disable_sync=True)
bot.start()
Few pointers to see whether we can reproduce this behavior akin 4.1.1-rc.1
where little code changes were found:
get_token()
produces a valid token? (You can also check this by seeing if bot.me
returns None
or an Application
object.)applications.commands
scope?Client.__sync()
, (which you should never do, but in this situation we want to see) can you set up a series of breakpoints and see the items returned by _cmds
?I am facing the same issue with the last version of the stable branch. not doing anything fancy, just trying to start the bot (with and without the example command)
bot = interactions.Client(token=TESTING_BOT_TOKEN)
@bot.command(
name="say_something",
description="say something!",
scope=the_id_of_your_guild,
options = [
interactions.Option(
name="text",
description="What you want to say",
type=interactions.OptionType.STRING,
required=True,
),
],
)
async def my_first_command(ctx: interactions.CommandContext, text: str):
await ctx.send(f"You said '{text}'!")
bot.start()
I haven't been able to use the package with a pip installation.
It should be resolved with the release of 4.2.1 (what will happen now-ish) and on the current unstable branch. If this issue still persists please open another issue
Right, I should note: this bug seems to be caused by a bot not having application.command
scope in a guild. There isn't too much we can do other than error out, which the bot now does in unstable
- this will be "fixed" by 4.2.1. i wrote this part before ed came along shhh
To fix this, make sure your invite link has the applications.command
scope in it.
Describe the bug.
On initial start, users have been reporting this error
They also have reported this did not happen in 4.1.1-rc.1
List the steps.
What you expected.
Normal operation
What you saw.
What version of the library did you use?
stable
Version specification
No response
Code of Conduct