import os, discord intents = discord.Intents.default() intents.message_content = True token = os.getenv("DISCORD_TOKEN") client = discord.Client(intents=intents) channelids = [1196201613132574733] @client.event async def on_ready(): print(f"Logged in as {client.user}") @client.event async def on_message(message): if message.channel.id in channelids: print(f"<{message.author.global_name}> {message.content}") client.run(token)