diff --git a/ircradio/disco.py b/ircradio/disco.py index 39e1fa4..d212ce6 100644 --- a/ircradio/disco.py +++ b/ircradio/disco.py @@ -44,6 +44,10 @@ async def on_message(message): if message.author == bot.user: return + if str(message.guild) not in settings.discord_servers: + print(f'Unapproved guild: {message.guild}') + return + msg = message.content if not msg.startswith(settings.discord_command_prefix): return diff --git a/settings.py_example b/settings.py_example index f92af62..62c0b3c 100644 --- a/settings.py_example +++ b/settings.py_example @@ -21,6 +21,7 @@ enable_search_route = bool_env(os.environ.get("ENABLE_SEARCH_ROUTE", False)) discord_token = "xxxxxxx" # https://discord.com/developers/applications discord_admins = ["lza.art101.eth#7207"] discord_command_prefix = "!" +discord_servers = ["Art101 • Patrn • NFT Art"] icecast2_hostname = "localhost" icecast2_max_clients = 32