This is my very first coding project and I'd like to write a small bot that reacts to every message sent. So far I've only been able to figure out how to respond specifically to messages that just say "word".
This is what I have so far:
import discord
class Client(discord.Client):
async def on_ready(self):
print(f'Logged on as {self.user}!')
async def on_message(self, message):
if message.author == self.user:
return
if message.content == 'word':
await message.add_reaction('\U0001F525')
intents = discord.Intents.default()
intents.message_content = True
client = Client(intents=intents)
client.run('token')
I've tried various ways of rewriting
if message.content == 'word':
but the only comment that I've received was that it shouldn't be an if statement if i want to include EVERY message. Since I'm completely new to all this I don't know what the alternative could be.
TIA