This repository was archived by the owner on Mar 5, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathmisc_commands.py
More file actions
49 lines (44 loc) · 1.46 KB
/
misc_commands.py
File metadata and controls
49 lines (44 loc) · 1.46 KB
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
from classes import PokeBotCog
from discord.ext import commands
from cogs.logic.misc_logic import MiscLogic
from modules.pokebot_exceptions import UnregisteredTrainerException
class MiscCommands(PokeBotCog):
def __init__(self, bot):
super().__init__()
self.misc_logic = MiscLogic(bot)
@commands.command(name='gif', pass_context=True)
async def gif(
self,
ctx,
pkmn_name: str = commands.parameter(
description="The pokemon name to look up."
),
shiny: str = commands.parameter(
description="Specify 'shiny' or not to look up shiny gif",
default=None
)
):
"""
Display a gif of the pokemon
"""
embed_msg = await self.misc_logic.build_gif_embed(pkmn_name, shiny)
await ctx.send(embed=embed_msg)
@commands.command(name='profile', pass_context=True)
async def profile(
self,
ctx: commands.Context,
user_mention: str = commands.parameter(
description="The @-mention of the user on disord."
)
) -> None:
"""
Obtains the profile of a trainer specified
"""
try:
embed_msg = await self.misc_logic.build_trainer_profile_msg(
ctx,
user_mention
)
await ctx.send(embed=embed_msg)
except UnregisteredTrainerException:
await self.post_unregistered_trainer_exception_msg(ctx)