feat(logger): added the cog

This commit is contained in:
Seaswimmer 2024-05-24 02:55:52 -04:00
parent 09ab8aa69d
commit 1a26d82c36
Signed by: cswimr
GPG key ID: 5D671B5D03D65A7F
5 changed files with 208 additions and 0 deletions

30
logger/menu.py Normal file
View file

@ -0,0 +1,30 @@
from discord import Embed, Message, ui
from redbot.core import commands
from .config import config
async def get_config(ctx: commands.Context) -> dict:
return dict(sorted(await config.guild(ctx.guild).all().items()))
async def get_embed(ctx: commands.Context, type: str = None):
conf = await get_config(ctx)
if not type or type not in conf.keys():
embed = Embed(
title="Logger Configuration - Message Delete",
description="Please select a configuration option below.",
color=await ctx.embed_color(),
)
class ConfigMenu(ui.View):
def __init__(self, ctx: commands.Context, message: Message, type: str = None, timeout: int = None):
super().__init__()
self.ctx = ctx
self.message = message
self.type = type
self.timeout = timeout
async def on_timeout(self):
await self.message.edit(view=None)