From 5a4095d4ceac4e3f733933ae66aa41e2053929c6 Mon Sep 17 00:00:00 2001 From: insert Date: Thu, 26 Dec 2024 12:13:02 -0500 Subject: [PATCH] Update --- starboard.py | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 starboard.py diff --git a/starboard.py b/starboard.py new file mode 100644 index 0000000..17e4740 --- /dev/null +++ b/starboard.py @@ -0,0 +1,28 @@ +import nextcord +from nextcord.ext import commands +from nextcord import TextInputStyle +from dotenv import load_dotenv +from random import randint +import aiosqlite as sqlite3 +import requests +import json +import traceback +import sys +from datetime import datetime +import base64 +from urllib.parse import urlparse +import os + +class starboard(commands.Cog): + def __init__(self, bot: commands.Bot): + self.bot = bot + + @commands.Cog.listener('on_raw_reaction_add') + async def on_raw_reaction_add(self,payload): + if payload.emoji == "⭐": + chann = self.bot.get_channel(payload.channel_id) + message = chann.fetch_message(payload.message_id) + await message.forward(chann) + +def setup(bot: commands.Bot): + bot.add_cog(starboard(bot)) \ No newline at end of file