Moved message listener to a cog. Listener is set up on bot run. Listener listens to all messages. Pulls score and image from a message sent in submission channel if a user has an active submission.

This commit is contained in:
alwayscompiling
2022-07-10 20:05:20 -04:00
parent 198d9008b9
commit b61008518c
4 changed files with 55 additions and 14 deletions
+3
View File
@@ -24,6 +24,8 @@ highscores_config = open_highscores_config()
highscores_data = open_highscores_data()
highscores_message_map = open_message_map()
submission_messages: dict = {}
def main():
"""Main function for bot."""
@@ -33,6 +35,7 @@ def main():
# Required in order to read messages (eg. prefix commands)
intents.message_content = True # pylint: disable=assigning-non-slot
intents.messages = True # pylint: disable=assigning-non-slot
# To enable the guilds priveleged intent:
# intents.guilds = True