Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in prefixhandling found in logs #73

Open
Ev-1 opened this issue Nov 11, 2022 · 0 comments
Open

Error in prefixhandling found in logs #73

Ev-1 opened this issue Nov 11, 2022 · 0 comments
Assignees

Comments

@Ev-1
Copy link
Collaborator

Ev-1 commented Nov 11, 2022

Scrolling through the logs I found this error. It did not persist, there might be a big in how prefixes are stored and presented to discord.py

[2022-11-06 10:25:23] [ERROR   ] discord.client: Ignoring exception in on_message
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/discord/ext/commands/bot.py", line 1296, in get_context
    if origin.content.startswith(tuple(prefix)):
TypeError: tuple for startswith must only contain str, not list

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/discord/client.py", line 409, in _run_event
    await coro(*args, **kwargs)
  File "/app/bot.py", line 65, in on_message
    await self.process_commands(message)
  File "/app/bot.py", line 68, in process_commands
    ctx = await self.get_context(message, cls=LocalizedContext)
  File "/usr/local/lib/python3.10/site-packages/discord/ext/commands/bot.py", line 1310, in get_context
    raise TypeError(
TypeError: Iterable command_prefix or list returned from get_prefix must contain only strings, not list
[2022-11-06 10:25:30] [ERROR   ] discord.client: Ignoring exception in on_message
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/discord/ext/commands/bot.py", line 1296, in get_context
    if origin.content.startswith(tuple(prefix)):
TypeError: tuple for startswith must only contain str, not list

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/discord/client.py", line 409, in _run_event
    await coro(*args, **kwargs)
  File "/app/bot.py", line 65, in on_message
    await self.process_commands(message)
  File "/app/bot.py", line 68, in process_commands
    ctx = await self.get_context(message, cls=LocalizedContext)
  File "/usr/local/lib/python3.10/site-packages/discord/ext/commands/bot.py", line 1310, in get_context
    raise TypeError(
TypeError: Iterable command_prefix or list returned from get_prefix must contain only strings, not list
@Ev-1 Ev-1 self-assigned this Nov 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant