diff --git a/.env.example b/.env.example index 03652b9..95d2106 100644 --- a/.env.example +++ b/.env.example @@ -1 +1,3 @@ -DISCORD_TOKEN=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \ No newline at end of file +DISCORD_TOKEN=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +CHANNEL_ID=everywhere +# ^ or a channel id \ No newline at end of file diff --git a/bot.py b/bot.py index 61a88d3..9f3da53 100644 --- a/bot.py +++ b/bot.py @@ -11,7 +11,6 @@ intents = discord.Intents.default() intents.message_content = True client = commands.Bot(command_prefix="[[", intents=intents) -tree = client.tree with open("silly_words.json") as f: words = ( list( @@ -27,17 +26,17 @@ @client.event async def on_ready(): - for guild in client.guilds: - # someone online said you shouldn't do this but fuck them - await tree.sync(guild=guild) print("nya~ im ready!!!! :3 :3 :3 :3") @client.event async def on_message(msg: discord.Message): await client.process_commands(msg) - if msg.channel.id != 1232165944168546346: - return + if ( + str(msg.channel.id) != os.getenv("CHANNEL_ID") + and not os.getenv("CHANNEL_ID") == "everywhere" + ): + return 0 print("omg message :3 :3 :3 :3") if msg.author.bot: print("bot :(")