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

[BUG] Bot refusing to create channel #2783

Closed
ElijahPepe opened this issue Apr 16, 2020 · 6 comments
Closed

[BUG] Bot refusing to create channel #2783

ElijahPepe opened this issue Apr 16, 2020 · 6 comments
Labels
maybe: bug An unconfirmed bug

Comments

@ElijahPepe
Copy link

Describe the bug
The bot attempts to create a channel when modmailed, but cannot.

Bot Info
Bot version: 3.4.1
Host method: Heroku

To Reproduce
Steps to reproduce the behavior:

  1. Type to the bot.
  2. The bot will give you the check.
  3. No channel is created.

Error Logs

Traceback (most recent call last):
  File "/app/.heroku/python/lib/python3.7/site-packages/discord/client.py", line 270, in _run_event
    await coro(*args, **kwargs)
  File "bot.py", line 868, in on_message
    await self.process_commands(message)
  File "bot.py", line 875, in process_commands
    return await self.process_dm_modmail(message)
  File "bot.py", line 744, in process_dm_modmail
    thread = await self.threads.create(message.author)
  File "/app/core/thread.py", line 988, in create
    if category is None and len(cat.channels) == 50:
AttributeError: 'NoneType' object has no attribute 'channels'
2020-04-16 03:23:27 core.thread[918] - WARNING: Found existing thread for 301194255731392513 but the channel is invalid.
2020-04-16 03:23:30 core.thread[977] - WARNING: Found an existing thread for ElijahPepe#4897, closing previous thread.
2020-04-16 03:23:30 __main__[1126] - ERROR: Ignoring exception in on_message.
2020-04-16 03:23:30 __main__[1127] - ERROR: Unexpected exception:
Traceback (most recent call last):
  File "/app/.heroku/python/lib/python3.7/site-packages/discord/client.py", line 270, in _run_event
    await coro(*args, **kwargs)
  File "bot.py", line 868, in on_message
    await self.process_commands(message)
  File "bot.py", line 875, in process_commands
    return await self.process_dm_modmail(message)
  File "bot.py", line 744, in process_dm_modmail
    thread = await self.threads.create(message.author)
  File "/app/core/thread.py", line 988, in create
    if category is None and len(cat.channels) == 50:
AttributeError: 'NoneType' object has no attribute 'channels'

Additional context
Happens in every server regardless of anything.

@ElijahPepe ElijahPepe added the maybe: bug An unconfirmed bug label Apr 16, 2020
@ElijahPepe ElijahPepe changed the title [BUG] bug report title here [BUG] Bot refusing to create channel Apr 16, 2020
@StephenDaDev
Copy link
Member

is your bot in multiple servers? Have you changed the GUILD_ID recently?

@ElijahPepe
Copy link
Author

  1. I just created it.
  2. I didn't change the GUILD_ID.

@StephenDaDev
Copy link
Member

@ElijahPepe Is this issue still happening with the latest update?

@gabefraser
Copy link

I am experiencing the same issue. I haven't changed the GUILD_ID and I am using the latest version of repository.

@lorenzo132
Copy link
Member

Hey, try running ?setup , if this does not work try ?config set main_category_id 3672362836872387 ( replace the numbers with the modmail-catagory id )
And if none of those work your modmail-catagory most likely run out of channel space. ( the max allowed channels in 1 catagory is 50 )

fourjr added a commit that referenced this issue Nov 4, 2020
@fourjr
Copy link
Collaborator

fourjr commented Nov 10, 2020

No recent reports, closing

@fourjr fourjr closed this as completed Nov 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maybe: bug An unconfirmed bug
Projects
None yet
Development

No branches or pull requests

5 participants