This script isn't mine. The script is functional, but it only works for one user. I want it to react to all messages sent within a certain channel from any user. I think the problem lies in message.author.id thing, I tried just full out removing the line but it ended up just breaking the entire thing and it wouldn't start up the discord bot. Any help is greatly appreciated.
from discord.ext import commands
from discord.ext.commands import Bot
import asyncio
bot = commands.Bot(command_prefix = "$")
@bot.event
async def on_ready():
print ("welcome_msg")
async def react(message):
custom_emojis = [
":like:",
":emoji:",
":emoji:"
]
guild_emoji_names = [str(guild_emoji) for guild_emoji in message.guild.emojis]
for emoji in custom_emojis:
if emoji in guild_emoji_names:
await message.add_reaction(emoji)
@bot.event
async def on_message(message):
if message.channel.id == 721485450790830111 and \
message.author.id == 721483699719241748:
await react(message)```