I have this code, in cog, it doesn't do anything and I dont have any errors, discord.py. I want the bot to auto react on every message in specific channel
from discord.ext import commands from discord.ext.commands import Bot import asyncio client = commands.Bot(command_prefix = '*') class Autoreact(commands.Cog): def __init__(self, client): self.client = client @commands.Cog.listener() async def on_message(self, message): if (message.channel.id == "817770701603340289"): await message.add_reaction(":daek:817793235988643861") def setup(client): client.add_cog(Autoreact(client)) 1 Answer
ID's are integers, not strings
@commands.Cog.listener() async def on_message(self, message): if message.channel.id == 817770701603340289: await message.add_reaction(":daek:817793235988643861")