-
-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathinfo.py
More file actions
32 lines (22 loc) · 948 Bytes
/
info.py
File metadata and controls
32 lines (22 loc) · 948 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
from __future__ import annotations
from typing import TYPE_CHECKING
from discord import app_commands
from discord.app_commands import locale_str
from discord.ext import commands
from ..utils.embed import DefaultEmbed
if TYPE_CHECKING:
from embed_fixer.bot import EmbedFixer
from ..bot import Interaction
class InfoCog(commands.Cog):
def __init__(self, bot: EmbedFixer) -> None:
self.bot = bot
@app_commands.command(name="info", description=locale_str("info_cmd_desc"))
async def settings(self, i: Interaction) -> None:
lang = await self.bot.translator.get_guild_lang(i.guild)
embed = DefaultEmbed(
title="Embed Fixer", description=self.bot.translator.get(lang, "info_embed_desc")
)
embed.set_image(url="https://i.imgur.com/919Gum1.png")
await i.response.send_message(embed=embed)
async def setup(bot: EmbedFixer) -> None:
await bot.add_cog(InfoCog(bot))