call robert out for sending insta reel links

This commit is contained in:
LBlend committed 2023-03-10 22:25:13 +09:00
1 parent d3fded16b8
commit 2f837a874a
2 files changed
+52

No files matched your search

+3
View File
@@ -75,6 +75,9 @@ class FunReplies(commands.Cog):
await message.reply('<:Nei:826593267642662912>')
self.previous_invokations['yeet'] = datetime.now()
elif re.search(r'https?://(www\.)?instagram\.com/reel/.*', message_content, flags=re.IGNORECASE) and message.author.id == 205741213050077185:
await message.reply('||Bruk yt-dlp REEEE||\nhttps://media.tenor.com/Fm0bJgHucO8AAAAd/epic-embed-fail.gif')
async def setup(bot: commands.Bot):
"""
+49
View File
@@ -0,0 +1,49 @@
import discord
from discord import app_commands
from discord.ext import commands
from cogs.utils import discord_utils, embed_templates
class Streak(commands.Cog):
"""Cog for handling message streaks on the server"""
def __init__(self, bot: commands.Bot):
"""
Parameters
----------
bot (commands.Bot): The bot instance
"""
self.bot = bot
self.cursor = self.bot.db_connection.cursor()
self.init_db()
def init_db(self):
"""Create the necessary tables for the streak cog to work."""
self.cursor.execute(
"""
CREATE TABLE IF NOT EXISTS streak (
discord_id BIGINT PRIMARY KEY,
streak INT NOT NULL DEFAULT 0,
last_post timestamp NOT NULL
);
"""
)
self.bot.db_connection.commit()
@commands.command()
async def setup(bot: commands.Bot):
"""
Add the cog to the bot on extension load
Parameters
----------
bot (commands.Bot): Bot instance
"""
bot.add_listener(Streak(bot).gullkorn_listener, 'on_message')
await bot.add_cog(Streak(bot))