modmail-dev / Modmail

A Discord bot that functions as a shared inbox between staff and members, similar to Reddit's Modmail.
https://docs.modmail.dev
GNU Affero General Public License v3.0
1.58k stars 4.59k forks source link

[BUG] main_category_id and log_channel_id resset to None #2823

Closed XtoManuel closed 3 years ago

XtoManuel commented 4 years ago

Describe the bug The parameters of log_channel_id and main_category_id are removed from the configuration. You have to configure them manually, but after restarting the BOT it is removed again and MongoDB is also removed.

Bot Info Bot version (check with @modmail about): 3.5.0 Host method (Heroku, self-host, etc): Self-host in a VPS

To Reproduce Steps to reproduce the behavior:

  1. Who can reproduce (eg, anyone, owners)? Owners
  2. Where can it be played (eg on thread channels, recipient DM)? Any channel to configure the BOT
  3. Done what cause the error? Unknown
  4. Any recent changes to your bot? Bot update to version 3.5.0
  5. Errored: no

Error Logs If your Modmail bot is online, type @modmail debug hastebin and include the link here. https://hasteb.in/hiwupori [ Hastebin link doesn't work ]

Screenshots Add screenshots to help explain your problem. https://i.imgur.com/i6IZPac.png

fourjr commented 4 years ago

Is there a MongoDB connection error? Look into #2822

XtoManuel commented 4 years ago

It does not appear in the logs if it is caused by MongoDB, the messages that cannot be found in the log channel and the open channels of Modmail appear.

This is what is trying to happen with Hastebin, but the link has stopped working.

XtoManuel commented 4 years ago

Today

imagen

XtoManuel commented 4 years ago
2020-09-28 05:01:36 __main__[1143] - ERROR: Unexpected exception:
Traceback (most recent call last):
  File "/root/.local/share/virtualenvs/modmail-willy-BVTNA0We/lib/python3.7/site-packages/discord/client.py", line 312, in _run_event
    await coro(*args, **kwargs)
  File "bot.py", line 857, in on_message
    await self.process_commands(message)
  File "bot.py", line 864, in process_commands
    return await self.process_dm_modmail(message)
  File "bot.py", line 733, in process_dm_modmail
    thread = await self.threads.create(message.author)
  File "/root/DiscordBots/modmail-willy/core/thread.py", line 988, in create
    if category is None and len(cat.channels) == 50:
AttributeError: 'NoneType' object has no attribute 'channels'
2020-09-28 05:02:05 core.thread[918] - WARNING: Found existing thread for 759306055007207464 but the channel is invalid.
2020-09-28 05:02:07 __main__[1142] - ERROR: Ignoring exception in on_message.
2020-09-28 05:02:07 __main__[1143] - ERROR: Unexpected exception:
Traceback (most recent call last):
  File "/root/.local/share/virtualenvs/modmail-willy-BVTNA0We/lib/python3.7/site-packages/discord/client.py", line 312, in _run_event
    await coro(*args, **kwargs)
  File "bot.py", line 857, in on_message
    await self.process_commands(message)
  File "bot.py", line 864, in process_commands
    return await self.process_dm_modmail(message)
  File "bot.py", line 733, in process_dm_modmail
    thread = await self.threads.create(message.author)
  File "/root/DiscordBots/modmail-willy/core/thread.py", line 988, in create
    if category is None and len(cat.channels) == 50:
AttributeError: 'NoneType' object has no attribute 'channels'
2020-09-28 05:02:07 core.thread[918] - WARNING: Found existing thread for 759306055007207464 but the channel is invalid.
2020-09-28 05:02:08 __main__[1142] - ERROR: Ignoring exception in on_message.
2020-09-28 05:02:08 __main__[1143] - ERROR: Unexpected exception:
Traceback (most recent call last):
  File "/root/.local/share/virtualenvs/modmail-willy-BVTNA0We/lib/python3.7/site-packages/discord/client.py", line 312, in _run_event
    await coro(*args, **kwargs)
  File "bot.py", line 857, in on_message
    await self.process_commands(message)
  File "bot.py", line 864, in process_commands
    return await self.process_dm_modmail(message)
  File "bot.py", line 733, in process_dm_modmail
    thread = await self.threads.create(message.author)
  File "/root/DiscordBots/modmail-willy/core/thread.py", line 988, in create
    if category is None and len(cat.channels) == 50:
AttributeError: 'NoneType' object has no attribute 'channels'
2020-09-28 05:02:10 core.thread[977] - WARNING: Found an existing thread for Maizito#1508, closing previous thread.
2020-09-28 05:02:10 __main__[1142] - ERROR: Ignoring exception in on_message.
2020-09-28 05:02:10 __main__[1143] - ERROR: Unexpected exception:
Traceback (most recent call last):
  File "/root/.local/share/virtualenvs/modmail-willy-BVTNA0We/lib/python3.7/site-packages/discord/client.py", line 312, in _run_event
    await coro(*args, **kwargs)
  File "bot.py", line 857, in on_message
    await self.process_commands(message)
  File "bot.py", line 864, in process_commands
    return await self.process_dm_modmail(message)
  File "bot.py", line 733, in process_dm_modmail
    thread = await self.threads.create(message.author)
  File "/root/DiscordBots/modmail-willy/core/thread.py", line 988, in create
    if category is None and len(cat.channels) == 50:
AttributeError: 'NoneType' object has no attribute 'channels'
2020-09-28 05:02:12 core.thread[918] - WARNING: Found existing thread for 759306055007207464 but the channel is invalid.
2020-09-28 05:02:12 __main__[1142] - ERROR: Ignoring exception in on_message.
2020-09-28 05:02:12 __main__[1143] - ERROR: Unexpected exception:
Traceback (most recent call last):
  File "/root/.local/share/virtualenvs/modmail-willy-BVTNA0We/lib/python3.7/site-packages/discord/client.py", line 312, in _run_event
    await coro(*args, **kwargs)
  File "bot.py", line 857, in on_message
    await self.process_commands(message)
  File "bot.py", line 864, in process_commands
    return await self.process_dm_modmail(message)
  File "bot.py", line 733, in process_dm_modmail
    thread = await self.threads.create(message.author)
  File "/root/DiscordBots/modmail-willy/core/thread.py", line 988, in create
    if category is None and len(cat.channels) == 50:
AttributeError: 'NoneType' object has no attribute 'channels'
2020-09-28 05:04:47 __main__[1142] - ERROR: Ignoring exception in on_message.
2020-09-28 05:04:47 __main__[1143] - ERROR: Unexpected exception:
Traceback (most recent call last):
  File "/root/.local/share/virtualenvs/modmail-willy-BVTNA0We/lib/python3.7/site-packages/discord/client.py", line 312, in _run_event
    await coro(*args, **kwargs)
  File "bot.py", line 857, in on_message
    await self.process_commands(message)
  File "bot.py", line 864, in process_commands
    return await self.process_dm_modmail(message)
  File "bot.py", line 733, in process_dm_modmail
    thread = await self.threads.create(message.author)
  File "/root/DiscordBots/modmail-willy/core/thread.py", line 988, in create
    if category is None and len(cat.channels) == 50:
AttributeError: 'NoneType' object has no attribute 'channels'
2020-09-28 05:06:47 __main__[1142] - ERROR: Ignoring exception in on_message.
2020-09-28 05:06:47 __main__[1143] - ERROR: Unexpected exception:
Traceback (most recent call last):
  File "/root/.local/share/virtualenvs/modmail-willy-BVTNA0We/lib/python3.7/site-packages/discord/client.py", line 312, in _run_event
    await coro(*args, **kwargs)
  File "bot.py", line 857, in on_message
    await self.process_commands(message)
  File "bot.py", line 864, in process_commands
    return await self.process_dm_modmail(message)
  File "bot.py", line 733, in process_dm_modmail
    thread = await self.threads.create(message.author)
  File "/root/DiscordBots/modmail-willy/core/thread.py", line 988, in create
    if category is None and len(cat.channels) == 50:
AttributeError: 'NoneType' object has no attribute 'channels'
2020-09-28 05:06:51 core.thread[918] - WARNING: Found existing thread for 759306055007207464 but the channel is invalid.
2020-09-28 05:06:52 core.thread[918] - WARNING: Found existing thread for 759306055007207464 but the channel is invalid.
2020-09-28 05:06:52 __main__[1142] - ERROR: Ignoring exception in on_message.
2020-09-28 05:06:52 __main__[1143] - ERROR: Unexpected exception:
Traceback (most recent call last):
  File "/root/.local/share/virtualenvs/modmail-willy-BVTNA0We/lib/python3.7/site-packages/discord/client.py", line 312, in _run_event
    await coro(*args, **kwargs)
  File "bot.py", line 857, in on_message
    await self.process_commands(message)
  File "bot.py", line 864, in process_commands
    return await self.process_dm_modmail(message)
  File "bot.py", line 733, in process_dm_modmail
    thread = await self.threads.create(message.author)
  File "/root/DiscordBots/modmail-willy/core/thread.py", line 988, in create
    if category is None and len(cat.channels) == 50:
AttributeError: 'NoneType' object has no attribute 'channels'
2020-09-28 05:06:52 __main__[1142] - ERROR: Ignoring exception in on_message.
2020-09-28 05:06:52 __main__[1143] - ERROR: Unexpected exception:
Traceback (most recent call last):
  File "/root/.local/share/virtualenvs/modmail-willy-BVTNA0We/lib/python3.7/site-packages/discord/client.py", line 312, in _run_event
    await coro(*args, **kwargs)
  File "bot.py", line 857, in on_message
    await self.process_commands(message)
  File "bot.py", line 864, in process_commands
    return await self.process_dm_modmail(message)
  File "bot.py", line 733, in process_dm_modmail
    thread = await self.threads.create(message.author)
  File "/root/DiscordBots/modmail-willy/core/thread.py", line 988, in create
    if category is None and len(cat.channels) == 50:
AttributeError: 'NoneType' object has no attribute 'channels'
2020-09-28 05:06:54 core.thread[918] - WARNING: Found existing thread for 759306055007207464 but the channel is invalid.
2020-09-28 05:10:48 __main__[1159] - WARNING: CommandNotFound: Command "-." is not found
2020-09-28 05:11:08 __main__[1159] - WARNING: CommandNotFound: Command "(" is not found
2020-09-28 05:21:12 __main__[1142] - ERROR: Ignoring exception in on_message.
2020-09-28 05:21:12 __main__[1143] - ERROR: Unexpected exception:
Traceback (most recent call last):
  File "/root/.local/share/virtualenvs/modmail-willy-BVTNA0We/lib/python3.7/site-packages/discord/client.py", line 312, in _run_event
    await coro(*args, **kwargs)
  File "bot.py", line 857, in on_message
    await self.process_commands(message)
  File "bot.py", line 864, in process_commands
    return await self.process_dm_modmail(message)
  File "bot.py", line 733, in process_dm_modmail
    thread = await self.threads.create(message.author)
  File "/root/DiscordBots/modmail-willy/core/thread.py", line 988, in create
    if category is None and len(cat.channels) == 50:
AttributeError: 'NoneType' object has no attribute 'channels'
2020-09-28 05:21:56 core.thread[918] - WARNING: Found existing thread for 755899439595651196 but the channel is invalid.
2020-09-28 05:32:31 __main__[1159] - WARNING: CommandNotFound: Command "-." is not found
2020-09-28 05:53:49 __main__[1159] - WARNING: CommandNotFound: Command "-." is not found
2020-09-28 06:16:54 __main__[1159] - WARNING: CommandNotFound: Command "-." is not found
2020-09-28 06:18:22 __main__[1159] - WARNING: CommandNotFound: Command "v" is not found
2020-09-28 06:22:24 __main__[1142] - ERROR: Ignoring exception in on_message.
2020-09-28 06:22:24 __main__[1143] - ERROR: Unexpected exception:
Traceback (most recent call last):
  File "/root/.local/share/virtualenvs/modmail-willy-BVTNA0We/lib/python3.7/site-packages/discord/client.py", line 312, in _run_event
    await coro(*args, **kwargs)
  File "bot.py", line 857, in on_message
    await self.process_commands(message)
  File "bot.py", line 864, in process_commands
    return await self.process_dm_modmail(message)
  File "bot.py", line 733, in process_dm_modmail
    thread = await self.threads.create(message.author)
  File "/root/DiscordBots/modmail-willy/core/thread.py", line 988, in create
    if category is None and len(cat.channels) == 50:
AttributeError: 'NoneType' object has no attribute 'channels'
2020-09-28 06:25:18 __main__[1159] - WARNING: CommandNotFound: Command "-." is not found
2020-09-28 06:34:09 __main__[1142] - ERROR: Ignoring exception in on_message.
2020-09-28 06:34:09 __main__[1143] - ERROR: Unexpected exception:
Traceback (most recent call last):
  File "/root/.local/share/virtualenvs/modmail-willy-BVTNA0We/lib/python3.7/site-packages/discord/client.py", line 312, in _run_event
    await coro(*args, **kwargs)
  File "bot.py", line 857, in on_message
    await self.process_commands(message)
  File "bot.py", line 864, in process_commands
    return await self.process_dm_modmail(message)
  File "bot.py", line 733, in process_dm_modmail
    thread = await self.threads.create(message.author)
  File "/root/DiscordBots/modmail-willy/core/thread.py", line 988, in create
    if category is None and len(cat.channels) == 50:
AttributeError: 'NoneType' object has no attribute 'channels'
2020-09-28 06:34:12 core.thread[918] - WARNING: Found existing thread for 572987354415890433 but the channel is invalid.
2020-09-28 06:47:08 __main__[1159] - WARNING: CommandNotFound: Command "_." is not found
2020-09-28 06:54:31 __main__[1142] - ERROR: Ignoring exception in on_message.
2020-09-28 06:54:31 __main__[1143] - ERROR: Unexpected exception:
Traceback (most recent call last):
  File "/root/.local/share/virtualenvs/modmail-willy-BVTNA0We/lib/python3.7/site-packages/discord/client.py", line 312, in _run_event
    await coro(*args, **kwargs)
  File "bot.py", line 857, in on_message
    await self.process_commands(message)
  File "bot.py", line 864, in process_commands
    return await self.process_dm_modmail(message)
  File "bot.py", line 733, in process_dm_modmail
    thread = await self.threads.create(message.author)
  File "/root/DiscordBots/modmail-willy/core/thread.py", line 988, in create
    if category is None and len(cat.channels) == 50:
AttributeError: 'NoneType' object has no attribute 'channels'
2020-09-28 06:54:47 core.thread[918] - WARNING: Found existing thread for 646503648247021599 but the channel is invalid.
2020-09-28 06:54:47 __main__[1142] - ERROR: Ignoring exception in on_message.
2020-09-28 06:54:47 __main__[1143] - ERROR: Unexpected exception:
Traceback (most recent call last):
  File "/root/.local/share/virtualenvs/modmail-willy-BVTNA0We/lib/python3.7/site-packages/discord/client.py", line 312, in _run_event
    await coro(*args, **kwargs)
  File "bot.py", line 857, in on_message
    await self.process_commands(message)
  File "bot.py", line 864, in process_commands
    return await self.process_dm_modmail(message)
  File "bot.py", line 733, in process_dm_modmail
    thread = await self.threads.create(message.author)
  File "/root/DiscordBots/modmail-willy/core/thread.py", line 988, in create
    if category is None and len(cat.channels) == 50:
AttributeError: 'NoneType' object has no attribute 'channels'
2020-09-28 06:54:50 core.thread[918] - WARNING: Found existing thread for 646503648247021599 but the channel is invalid.
2020-09-28 06:54:58 __main__[1142] - ERROR: Ignoring exception in on_message.
2020-09-28 06:54:58 __main__[1143] - ERROR: Unexpected exception:
Traceback (most recent call last):
  File "/root/.local/share/virtualenvs/modmail-willy-BVTNA0We/lib/python3.7/site-packages/discord/client.py", line 312, in _run_event
    await coro(*args, **kwargs)
  File "bot.py", line 857, in on_message
    await self.process_commands(message)
  File "bot.py", line 864, in process_commands
    return await self.process_dm_modmail(message)
  File "bot.py", line 733, in process_dm_modmail
    thread = await self.threads.create(message.author)
  File "/root/DiscordBots/modmail-willy/core/thread.py", line 988, in create
    if category is None and len(cat.channels) == 50:
AttributeError: 'NoneType' object has no attribute 'channels'
2020-09-28 06:55:07 core.thread[918] - WARNING: Found existing thread for 646503648247021599 but the channel is invalid.
2020-09-28 06:55:10 core.thread[977] - WARNING: Found an existing thread for Kirito-kun#8298, closing previous thread.
2020-09-28 06:55:10 __main__[1142] - ERROR: Ignoring exception in on_message.
2020-09-28 06:55:10 __main__[1143] - ERROR: Unexpected exception:
Traceback (most recent call last):
  File "/root/.local/share/virtualenvs/modmail-willy-BVTNA0We/lib/python3.7/site-packages/discord/client.py", line 312, in _run_event
    await coro(*args, **kwargs)
  File "bot.py", line 857, in on_message
    await self.process_commands(message)
  File "bot.py", line 864, in process_commands
    return await self.process_dm_modmail(message)
  File "bot.py", line 733, in process_dm_modmail
    thread = await self.threads.create(message.author)
  File "/root/DiscordBots/modmail-willy/core/thread.py", line 988, in create
    if category is None and len(cat.channels) == 50:
AttributeError: 'NoneType' object has no attribute 'channels'
2020-09-28 07:29:30 __main__[1159] - WARNING: CommandNotFound: Command "___." is not found
2020-09-28 07:31:20 __main__[1159] - WARNING: CommandNotFound: Command "___." is not found
2020-09-28 07:31:54 __main__[1159] - WARNING: CommandNotFound: Command "_." is not found
2020-09-28 07:34:19 __main__[1159] - WARNING: CommandNotFound: Command "_." is not found
2020-09-28 07:34:30 __main__[1159] - WARNING: CommandNotFound: Command "___." is not found
2020-09-28 07:41:17 __main__[1159] - WARNING: CommandNotFound: Command "_." is not found
2020-09-28 07:43:12 __main__[1159] - WARNING: CommandNotFound: Command "_." is not found
2020-09-28 07:44:40 __main__[1159] - WARNING: CommandNotFound: Command "-." is not found
2020-09-28 07:45:44 __main__[1159] - WARNING: CommandNotFound: Command "_." is not found
2020-09-28 07:49:37 __main__[1159] - WARNING: CommandNotFound: Command "___." is not found
2020-09-28 07:55:08 __main__[1159] - WARNING: CommandNotFound: Command "__." is not found
2020-09-28 07:58:32 __main__[1159] - WARNING: CommandNotFound: Command "___." is not found
2020-09-28 07:58:58 __main__[1159] - WARNING: CommandNotFound: Command "___." is not found
2020-09-28 08:11:49 __main__[1159] - WARNING: CommandNotFound: Command "_." is not found
2020-09-28 08:13:22 __main__[1159] - WARNING: CommandNotFound: Command "_." is not found
2020-09-28 08:14:08 __main__[1159] - WARNING: CommandNotFound: Command "___." is not found
2020-09-28 08:15:56 __main__[1159] - WARNING: CommandNotFound: Command "___." is not found
2020-09-28 08:17:34 __main__[1159] - WARNING: CommandNotFound: Command "_." is not found
2020-09-28 08:19:41 __main__[1159] - WARNING: CommandNotFound: Command "___." is not found
2020-09-28 09:35:50 __main__[1142] - ERROR: Ignoring exception in on_message.
2020-09-28 09:35:50 __main__[1143] - ERROR: Unexpected exception:
Traceback (most recent call last):
  File "/root/.local/share/virtualenvs/modmail-willy-BVTNA0We/lib/python3.7/site-packages/discord/client.py", line 312, in _run_event
    await coro(*args, **kwargs)
  File "bot.py", line 857, in on_message
    await self.process_commands(message)
  File "bot.py", line 864, in process_commands
    return await self.process_dm_modmail(message)
  File "bot.py", line 733, in process_dm_modmail
    thread = await self.threads.create(message.author)
  File "/root/DiscordBots/modmail-willy/core/thread.py", line 988, in create
    if category is None and len(cat.channels) == 50:
AttributeError: 'NoneType' object has no attribute 'channels'
2020-09-28 09:35:56 core.thread[918] - WARNING: Found existing thread for 452479974356811796 but the channel is invalid.
2020-09-28 09:36:02 __main__[1142] - ERROR: Ignoring exception in on_message.
2020-09-28 09:36:02 __main__[1143] - ERROR: Unexpected exception:
Traceback (most recent call last):
  File "/root/.local/share/virtualenvs/modmail-willy-BVTNA0We/lib/python3.7/site-packages/discord/client.py", line 312, in _run_event
    await coro(*args, **kwargs)
  File "bot.py", line 857, in on_message
    await self.process_commands(message)
  File "bot.py", line 864, in process_commands
    return await self.process_dm_modmail(message)
  File "bot.py", line 733, in process_dm_modmail
    thread = await self.threads.create(message.author)
  File "/root/DiscordBots/modmail-willy/core/thread.py", line 988, in create
    if category is None and len(cat.channels) == 50:
AttributeError: 'NoneType' object has no attribute 'channels'
2020-09-28 09:36:07 core.thread[918] - WARNING: Found existing thread for 452479974356811796 but the channel is invalid.
2020-09-28 09:36:11 __main__[1142] - ERROR: Ignoring exception in on_message.
2020-09-28 09:36:11 __main__[1143] - ERROR: Unexpected exception:
Traceback (most recent call last):
  File "/root/.local/share/virtualenvs/modmail-willy-BVTNA0We/lib/python3.7/site-packages/discord/client.py", line 312, in _run_event
    await coro(*args, **kwargs)
  File "bot.py", line 857, in on_message
    await self.process_commands(message)
  File "bot.py", line 864, in process_commands
    return await self.process_dm_modmail(message)
  File "bot.py", line 733, in process_dm_modmail
    thread = await self.threads.create(message.author)
  File "/root/DiscordBots/modmail-willy/core/thread.py", line 988, in create
    if category is None and len(cat.channels) == 50:
AttributeError: 'NoneType' object has no attribute 'channels'
2020-09-28 09:36:55 __main__[1142] - ERROR: Ignoring exception in on_message.
2020-09-28 09:36:55 __main__[1143] - ERROR: Unexpected exception:
Traceback (most recent call last):
  File "/root/.local/share/virtualenvs/modmail-willy-BVTNA0We/lib/python3.7/site-packages/discord/client.py", line 312, in _run_event
    await coro(*args, **kwargs)
  File "bot.py", line 857, in on_message
    await self.process_commands(message)
  File "bot.py", line 864, in process_commands
    return await self.process_dm_modmail(message)
  File "bot.py", line 733, in process_dm_modmail
    thread = await self.threads.create(message.author)
  File "/root/DiscordBots/modmail-willy/core/thread.py", line 988, in create
    if category is None and len(cat.channels) == 50:
AttributeError: 'NoneType' object has no attribute 'channels'
2020-09-28 09:37:51 core.thread[918] - WARNING: Found existing thread for 452479974356811796 but the channel is invalid.
2020-09-28 09:37:54 core.thread[977] - WARNING: Found an existing thread for Christian CM#5639, closing previous thread.
2020-09-28 09:37:54 __main__[1142] - ERROR: Ignoring exception in on_message.
2020-09-28 09:37:54 __main__[1143] - ERROR: Unexpected exception:
Traceback (most recent call last):
  File "/root/.local/share/virtualenvs/modmail-willy-BVTNA0We/lib/python3.7/site-packages/discord/client.py", line 312, in _run_event
    await coro(*args, **kwargs)
  File "bot.py", line 857, in on_message
    await self.process_commands(message)
  File "bot.py", line 864, in process_commands
    return await self.process_dm_modmail(message)
  File "bot.py", line 733, in process_dm_modmail
    thread = await self.threads.create(message.author)
  File "/root/DiscordBots/modmail-willy/core/thread.py", line 988, in create
    if category is None and len(cat.channels) == 50:
AttributeError: 'NoneType' object has no attribute 'channels'
2020-09-28 09:38:52 __main__[1142] - ERROR: Ignoring exception in on_message.
2020-09-28 09:38:52 __main__[1143] - ERROR: Unexpected exception:
Traceback (most recent call last):
  File "/root/.local/share/virtualenvs/modmail-willy-BVTNA0We/lib/python3.7/site-packages/discord/client.py", line 312, in _run_event
    await coro(*args, **kwargs)
  File "bot.py", line 857, in on_message
    await self.process_commands(message)
  File "bot.py", line 864, in process_commands
    return await self.process_dm_modmail(message)
  File "bot.py", line 733, in process_dm_modmail
    thread = await self.threads.create(message.author)
  File "/root/DiscordBots/modmail-willy/core/thread.py", line 988, in create
    if category is None and len(cat.channels) == 50:
AttributeError: 'NoneType' object has no attribute 'channels'
2020-09-28 09:39:03 core.thread[918] - WARNING: Found existing thread for 452479974356811796 but the channel is invalid.
2020-09-28 09:39:06 core.thread[977] - WARNING: Found an existing thread for Christian CM#5639, closing previous thread.
2020-09-28 09:39:06 __main__[1142] - ERROR: Ignoring exception in on_message.
2020-09-28 09:39:06 __main__[1143] - ERROR: Unexpected exception:
Traceback (most recent call last):
  File "/root/.local/share/virtualenvs/modmail-willy-BVTNA0We/lib/python3.7/site-packages/discord/client.py", line 312, in _run_event
    await coro(*args, **kwargs)
  File "bot.py", line 857, in on_message
    await self.process_commands(message)
  File "bot.py", line 864, in process_commands
    return await self.process_dm_modmail(message)
  File "bot.py", line 733, in process_dm_modmail
    thread = await self.threads.create(message.author)
  File "/root/DiscordBots/modmail-willy/core/thread.py", line 988, in create
    if category is None and len(cat.channels) == 50:
AttributeError: 'NoneType' object has no attribute 'channels'
2020-09-28 10:05:16 __main__[1159] - WARNING: CommandNotFound: Command "_." is not found
2020-09-28 10:09:12 __main__[1159] - WARNING: CommandNotFound: Command ".." is not found
2020-09-28 10:20:52 __main__[1159] - WARNING: CommandNotFound: Command "......" is not found
2020-09-28 10:22:15 __main__[1159] - WARNING: CommandNotFound: Command "__." is not found
2020-09-28 11:32:58 __main__[1142] - ERROR: Ignoring exception in on_message.
2020-09-28 11:32:58 __main__[1143] - ERROR: Unexpected exception:
Traceback (most recent call last):
  File "/root/.local/share/virtualenvs/modmail-willy-BVTNA0We/lib/python3.7/site-packages/discord/client.py", line 312, in _run_event
    await coro(*args, **kwargs)
  File "bot.py", line 857, in on_message
    await self.process_commands(message)
  File "bot.py", line 864, in process_commands
    return await self.process_dm_modmail(message)
  File "bot.py", line 733, in process_dm_modmail
    thread = await self.threads.create(message.author)
  File "/root/DiscordBots/modmail-willy/core/thread.py", line 988, in create
    if category is None and len(cat.channels) == 50:
AttributeError: 'NoneType' object has no attribute 'channels'
2020-09-28 12:19:02 __main__[91] - INFO: -------------------------
2020-09-28 12:19:02 __main__[92] - INFO: ┌┬┐┌─┐┌┬┐┌┬┐┌─┐┬┬
2020-09-28 12:19:02 __main__[93] - INFO: ││││ │ │││││├─┤││
2020-09-28 12:19:02 __main__[94] - INFO: ┴ ┴└─┘─┴┘┴ ┴┴ ┴┴┴─┘
2020-09-28 12:19:02 __main__[95] - INFO: v3.5.0
2020-09-28 12:19:02 __main__[96] - INFO: Authors: kyb3r, fourjr, Taaku18
2020-09-28 12:19:02 __main__[97] - INFO: -------------------------
2020-09-28 12:19:44 cogs.utility[606] - INFO: -------------------------
2020-09-28 12:19:44 cogs.utility[615] - INFO: Activity set to: Watching MDs. Envíame un mensaje para reportes o problemas en el servidor..
2020-09-28 12:19:44 cogs.utility[620] - INFO: Status set to: online.
2020-09-28 12:19:44 __main__[391] - INFO: -------------------------
2020-09-28 12:19:44 __main__[393] - INFO: Logged in as: Modmail#1523
2020-09-28 12:19:44 __main__[394] - INFO: Bot ID: 692762522830241902
2020-09-28 12:19:44 __main__[399] - INFO: Owners: Paul, XtoMHA96
2020-09-28 12:19:44 __main__[400] - INFO: Prefix: .
2020-09-28 12:19:44 __main__[401] - INFO: Guild Name: Willyrex! 🔥 🦖
2020-09-28 12:19:44 __main__[402] - INFO: Guild ID: 418586876899885056
2020-09-28 12:19:44 __main__[405] - INFO: -------------------------
2020-09-28 12:19:44 __main__[411] - INFO: There are 1 thread(s) pending to be closed.
2020-09-28 12:19:44 __main__[412] - INFO: -------------------------
2020-09-28 12:23:01 __main__[1185] - ERROR: Unexpected exception:
Traceback (most recent call last):
  File "/root/.local/share/virtualenvs/modmail-willy-BVTNA0We/lib/python3.7/site-packages/discord/ext/commands/core.py", line 83, in wrapped
    ret = await coro(*args, **kwargs)
  File "/root/DiscordBots/modmail-willy/cogs/modmail.py", line 890, in contact
    thread = await self.bot.threads.create(user, creator=ctx.author, category=category)
  File "/root/DiscordBots/modmail-willy/core/thread.py", line 988, in create
    if category is None and len(cat.channels) == 50:
AttributeError: 'NoneType' object has no attribute 'channels'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/root/.local/share/virtualenvs/modmail-willy-BVTNA0We/lib/python3.7/site-packages/discord/ext/commands/bot.py", line 892, in invoke
    await ctx.command.invoke(ctx)
  File "/root/.local/share/virtualenvs/modmail-willy-BVTNA0We/lib/python3.7/site-packages/discord/ext/commands/core.py", line 797, in invoke
    await injected(*ctx.args, **ctx.kwargs)
  File "/root/.local/share/virtualenvs/modmail-willy-BVTNA0We/lib/python3.7/site-packages/discord/ext/commands/core.py", line 92, in wrapped
    raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: 'NoneType' object has no attribute 'channels'
2020-09-28 12:24:10 core.thread[918] - WARNING: Found existing thread for 666570110386962452 but the channel is invalid.
2020-09-28 12:24:13 core.thread[977] - WARNING: Found an existing thread for CaptainUwU🌈#0700, closing previous thread.
2020-09-28 12:24:13 __main__[1185] - ERROR: Unexpected exception:
Traceback (most recent call last):
  File "/root/.local/share/virtualenvs/modmail-willy-BVTNA0We/lib/python3.7/site-packages/discord/ext/commands/core.py", line 83, in wrapped
    ret = await coro(*args, **kwargs)
  File "/root/DiscordBots/modmail-willy/cogs/modmail.py", line 890, in contact
    thread = await self.bot.threads.create(user, creator=ctx.author, category=category)
  File "/root/DiscordBots/modmail-willy/core/thread.py", line 988, in create
    if category is None and len(cat.channels) == 50:
AttributeError: 'NoneType' object has no attribute 'channels'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/root/.local/share/virtualenvs/modmail-willy-BVTNA0We/lib/python3.7/site-packages/discord/ext/commands/bot.py", line 892, in invoke
    await ctx.command.invoke(ctx)
  File "/root/.local/share/virtualenvs/modmail-willy-BVTNA0We/lib/python3.7/site-packages/discord/ext/commands/core.py", line 797, in invoke
    await injected(*ctx.args, **ctx.kwargs)
  File "/root/.local/share/virtualenvs/modmail-willy-BVTNA0We/lib/python3.7/site-packages/discord/ext/commands/core.py", line 92, in wrapped
    raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: 'NoneType' object has no attribute 'channels'
2020-09-28 12:24:45 __main__[1159] - WARNING: CommandNotFound: Command "options" is not found
lorenzo132 commented 4 years ago

Can confirm this bug, All this happens without any sort of error in the logs. and @fourjr the issue you linked, its not that as the mongouri is fully functional and works for a longer time.

@XtoMHA96 i'd recommend keeping the log-channel name as: #modmail-logs as it will automaticly look for that channel to post the logs when there is no logchannel set. The same counts to the modmail catagory, Keep the modmail-catagory name as: Modmail

fourjr commented 3 years ago

Since there is no way to accurately reproduce this bug, this issue will be closed.