I want to use discord.py on python3 to create a message that can be reacted to only by the person who sent the command.
However, I also want this message to be sent in a chat and then be reacted to, so I cannot just make the bot check for a message ID unless it is passed through to the raw_on_reaction event, and I do not know how to do that.
I need to create something similar to reaction roles, except it edits the message to create a sort of text-based game.
Here is what I have so far:
import discord
from discord.ext import commands
class Adventure(commands.Cog):
def __init__(self, bot):
self.bot = bot
@commands.command(name="Adventure")
async def adventure(self, ctx):
embed = discord.Embed(
title="Where to go, where to go?",
description="Choose where to start your text-based adventure!",
color=discord.Colour.red()
)
embed.add_field(
name="The wild forest",
value="A wild and unpredictable forest, where anything could happen! Beware of creatures as you attempt to escape!",
inline=False
)
message = await ctx.channel.send(embed=embed)
await message.add_reaction("")
def setup(bot):
bot.add_cog(Adventure(bot))
Note that this is inside of a Cog and I need the code to be written to work inside of a cog. I couldn't find any sources that did this inside of a cog without needless JSON databases, and I want to avoid those.