Skip to content

Commit 4b69502

Browse files
authored
Add the modmail extension (#884)
Adds a custom modmail extension, using a separate token, based on a forum channel.
1 parent 356a605 commit 4b69502

File tree

6 files changed

+1461
-4
lines changed

6 files changed

+1461
-4
lines changed

config.default.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@ bot_config:
66
disabled_extensions: ["kanye"]
77
default_prefix: "."
88
global_alerts_channel: ""
9+
modmail_config:
10+
enable_modmail: False
11+
disable_thread_creation: False
12+
modmail_auth_token:
13+
modmail_prefix:
14+
modmail_guild:
15+
modmail_forum_channel:
16+
modmail_log_channel:
917
database:
1018
postgres:
1119
user:

techsupport_bot/bot.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@
2222
from discord import app_commands
2323
from discord.ext import commands
2424

25+
loop = asyncio.new_event_loop()
26+
asyncio.set_event_loop(loop)
27+
2528

2629
class TechSupportBot(commands.Bot):
2730
"""The main bot object."""
@@ -957,10 +960,10 @@ async def start_irc(self):
957960
bool: True if the connection was successful, False if it was not
958961
"""
959962
irc_config = getattr(self.file_config.api, "irc")
960-
loop = asyncio.get_running_loop()
963+
main_loop = asyncio.get_running_loop()
961964

962965
irc_bot = ircrelay.IRCBot(
963-
loop=loop,
966+
loop=main_loop,
964967
server=irc_config.server,
965968
port=irc_config.port,
966969
channels=irc_config.channels,

0 commit comments

Comments
 (0)