diff options
author | 2021-05-17 01:26:24 +0100 | |
---|---|---|
committer | 2021-05-17 01:26:24 +0100 | |
commit | 7ded28e12d0466715d025fd084dd90c57a6aae8a (patch) | |
tree | b5ecfd6ed7c99bc340ca1c53fc2d7d5744304c40 | |
parent | Merge pull request #3 from python-discord/remove-opt-out (diff) | |
parent | fix: remove unused Union import (diff) |
Merge pull request #4 from vcokltfre/vcokltfre/chore/cleanup
chore: remove unneeded env variables and command processing
-rw-r--r-- | config-default.toml | 6 | ||||
-rw-r--r-- | metricity/bot.py | 6 | ||||
-rw-r--r-- | metricity/config.py | 5 |
3 files changed, 3 insertions, 14 deletions
diff --git a/config-default.toml b/config-default.toml index a6c7551..9dc8606 100644 --- a/config-default.toml +++ b/config-default.toml @@ -11,9 +11,6 @@ log_level = "INFO" discord_log_level = "INFO" [bot] -# The prefixes Metricity respond to. -command_prefix = ["m!"] - # The token Metricity will use to authenticate with Discord. token = { env = "BOT_TOKEN" } @@ -40,9 +37,6 @@ ignore_categories = [ 714494672835444826 ] -# Respond to opt-in/opt-out commands in the following channel -bot_commands_channel = 267659945086812160 - [database] # Postgres! diff --git a/metricity/bot.py b/metricity/bot.py index 34ab804..24f80fd 100644 --- a/metricity/bot.py +++ b/metricity/bot.py @@ -37,7 +37,8 @@ intents = Intents( bot = Bot( - command_prefix=BotConfig.command_prefix, + command_prefix="", + help_command=None, intents=intents, max_messages=None, activity=Game(f"Metricity {__version__}") @@ -289,9 +290,6 @@ async def on_message(message: DiscordMessage) -> None: """Add a message to the table when one is sent providing the author has accepted.""" await db_ready.wait() - if message.channel.id == BotConfig.bot_commands_channel: - await bot.process_commands(message) - if not message.guild: return diff --git a/metricity/config.py b/metricity/config.py index 1cf7dfa..5a57d59 100644 --- a/metricity/config.py +++ b/metricity/config.py @@ -2,7 +2,7 @@ import logging from os import environ from pathlib import Path -from typing import Any, Dict, List, Optional, Tuple, Union +from typing import Any, Dict, List, Optional, Tuple import toml from deepmerge import Merger @@ -109,7 +109,6 @@ class BotConfig(metaclass=ConfigSection): section = "bot" - command_prefix: Union[List[str], str] token: str guild_id: int @@ -118,8 +117,6 @@ class BotConfig(metaclass=ConfigSection): staff_categories: List[int] ignore_categories: List[int] - bot_commands_channel: int - class DatabaseConfig(metaclass=ConfigSection): """Configuration about the database Metricity will use.""" |