#My commands are getting registered as non-existing
1 messages · Page 1 of 1 (latest)
Or python -OO yourbotfile.py
This will perform some optimisations, so your bot can be run a bit more efficiently
Though, if you're actively debugging the bot, it'll strip out a lot of the features that make debugging easier. So you don't need to worry about it when you're working on your bot
Like the text said, you should do this optimization in production, though is optional
so yeah i'm lost atm
Show code without revealing token
just my main or?
bot = lightbulb.BotApp(
TOKEN,
prefix=lightbulb.when_mentioned_or(PREFIX),
intents=INTENTS,
cache_settings=CACHE,
help_slash_command=True,
ignore_bots=True,
case_insensitive_prefix_commands=True,
logs={
"version": 1,
"incremental": True,
"loggers": {
"hikari": {"level": "INFO"},
"lightbulb": {"level": "INFO"},
},
},
)
this is the line 13 error
super().__init__(token, **kwargs)
this is the line 209
self._token = token.strip()
line349
You are using the module, not the Permissions class
ahhh okay
advice_plugin = lightbulb.Plugin("advices", "Some advices that might aid you in your journey of life! :)")
@advice_plugin.command()
@lightbulb.add_cooldown(3, 3, lightbulb.UserBucket)
@lightbulb.command("advice", "Send useful advices!.", auto_defer = True)
@lightbulb.implements(lightbulb.PrefixCommand, lightbulb.SlashCommand)
async def dad(ctx: lightbulb.Context) -> None:
async with ctx.bot.d.aio_session.get(f'https://api.adviceslip.com/advice') as resp:
data = json.loads(await resp.read())
adv = data["slip"]["advice"]
emb = hikari.Embed(title="Here's some advice for you :)", description=adv)
await ctx.respond(embed=emb)
for all my commands when I perform them they show an error that the command in questionn does not exist
My commands are getting registered as non-existing
E 2023-03-19 12:43:54,202 hikari.event_manager: an exception occurred handling an event (GuildMessageCreateEvent)
Traceback (most recent call last):
File "C:\Users\quint\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\lightbulb\app.py", line 1056, in handle_message_create_for_prefix_commands
raise new_exc
File "C:\Users\quint\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\lightbulb\app.py", line 1037, in handle_message_create_for_prefix_commands
await self.process_prefix_commands(context)
File "C:\Users\quint\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\lightbulb\app.py", line 1004, in process_prefix_commands
raise errors.CommandNotFound(
lightbulb.errors.CommandNotFound: A command with name or alias 'advice' does not exist
ANY1?