11"""
2- Module for the hello command on the discord bot.
3- This module has unit tests
4- This modules requires no config, no databases, and no APIs
2+ Commands: /hello
3+ Config: None
4+ Databases: None
5+ Unit tests: No need
56"""
67
78from __future__ import annotations
89
910from typing import TYPE_CHECKING , Self
1011
11- from core import auxiliary , cogs
12- from discord .ext import commands
12+ import discord
13+ from core import cogs
14+ from discord import app_commands
1315
1416if TYPE_CHECKING :
1517 import bot
@@ -27,26 +29,15 @@ async def setup(bot: bot.TechSupportBot) -> None:
2729class Greeter (cogs .BaseCog ):
2830 """Class for the greeter command."""
2931
30- async def hello_command (self : Self , ctx : commands .Context ) -> None :
31- """A simple function to add HEY reactions to the command invocation
32-
33- Args:
34- ctx (commands.Context): The context in which the command was run in
35- """
36- await auxiliary .add_list_of_reactions (
37- message = ctx .message , reactions = ["🇭" , "🇪" , "🇾" ]
38- )
39-
40- @commands .command (
32+ @app_commands .command (
4133 name = "hello" ,
42- brief = "Says hello to the bot" ,
4334 description = "Says hello to the bot (because they are doing such a great job!)" ,
44- usage = "" ,
35+ extras = { "module" : "hello" } ,
4536 )
46- async def hello (self : Self , ctx : commands . Context ) -> None :
47- """Entry point for the .hello command on discord
37+ async def hello_app_command (self : Self , interaction : discord . Interaction ) -> None :
38+ """A simple command to have the bot say HEY to the invoker
4839
4940 Args:
50- ctx (commands.Context ): The context in which the command was run in
41+ interaction (discord.Interaction ): The interaction that called this command
5142 """
52- await self . hello_command ( ctx )
43+ await interaction . response . send_message ( "🇭 🇪 🇾" )
0 commit comments