Files
juniteevee-cogs/reactquote/reactquote.py

38 lines
1.2 KiB
Python
Raw Normal View History

2022-04-09 13:32:53 -04:00
from redbot.core import commands
2022-04-10 16:01:49 -04:00
import discord
2022-04-09 13:32:53 -04:00
class ReactQuote(commands.Cog):
"""Cog to store quotes by reacting with speech bubble"""
def __init__(self, bot):
self.bot = bot
2022-04-10 09:29:34 -04:00
def _wrapQuote(self, msg):
return msg
2022-04-09 13:32:53 -04:00
@commands.command()
2022-04-10 16:01:49 -04:00
async def reactquote(self, ctx: commands.Context):
2022-04-09 13:41:50 -04:00
"""TestCommand"""
2022-04-09 13:32:53 -04:00
# Your code will go here
2022-04-10 09:29:34 -04:00
await ctx.send("I can do stuff, really!")
2022-04-10 16:01:49 -04:00
@commands.command()
async def quote(self, ctx: commands.Context):
"""TestCommand"""
# Your code will go here
await ctx.send("I can do stuff, really!")
@commands.Cog.listener()
async def on_raw_reaction_add(self, payload:discord.RawReactionActionEvent):
2022-04-10 22:45:59 -04:00
message = await self.bot.get_channel(payload.channel_id)
message.channel.send('Did I work')
2022-04-10 16:01:49 -04:00
"""On React"""
2022-04-10 22:37:15 -04:00
if str(payload.emoji) == '💬':
message = await self.bot.get_channel(payload.channel_id).fetch_message(payload.message_id)
user = payload.member
2022-04-10 22:45:59 -04:00
message.channel.send('Did I work')
@commands.Cog.listener()
async def on_reaction_add(reaction: discord.Reaction, user: discord.User):
reaction.message.channel.send('Did I work2')