17 lines
462 B
Python
17 lines
462 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:
|
||
|
|
print(interaction.message)
|
||
|
|
await interaction.message.delete()
|