FunkyBot/libs/Cog.py

16 lines
423 B
Python

import discord
from discord.ext import commands
class Cog(commands.Cog):
def __init__(self, bot):
self.bot = bot
self.messages_deletable = False
@commands.Cog.listener()
async def on_ready(self):
print(f"{self.__name__} is ready")
async def delete_message(self, interaction: discord.Interaction):
if self.messages_deletable:
await interaction.message.delete()