diff --git a/src/bot.py b/src/bot.py index 04d72e4..78713bb 100644 --- a/src/bot.py +++ b/src/bot.py @@ -3,6 +3,7 @@ from datetime import datetime TOKEN = 'your_bot_token' +# change the whitelisted server ids to all to log all servers, if not just add the server id WHITELISTED_SERVER_IDS = [12345679, 123465976] client = discord.Client() @@ -16,7 +17,7 @@ async def on_message(message): timestamp = datetime.now().strftime('%Y-%m-%d %H:%M:%S') if message.guild: - if message.guild.id in WHITELISTED_SERVER_IDS: + if WHITELISTED_SERVER_IDS == 'all' or message.guild.id in WHITELISTED_SERVER_IDS: server_folder = f'/path/to/dir/{message.guild.id}' os.makedirs(server_folder, exist_ok=True) channel_file = f'{server_folder}/{message.channel.name}.md'