Fixed test command to work with slash commands

This commit is contained in:
Ziad Arafat committed 2025-08-11 06:15:37 -06:00
1 parent e82ed1bcf1
commit 29094c5d0f
3 files changed
+18 -3

No files matched your search

+3 -3
View File
@@ -1,4 +1,5 @@
from redbot.core import app_commands, commands
import discord
class AlignmentCog(commands.Cog):
@@ -8,7 +9,6 @@ class AlignmentCog(commands.Cog):
self.bot = bot
@app_commands.command()
async def alignment(self, ctx):
async def alignment(self, interaction: discord.Interaction):
"""This does stuff!"""
# Your code will go here
await ctx.send("I can do stuff!")
await interaction.response.send_message("Hello World!", ephemeral=True)
+1
View File
@@ -8,6 +8,7 @@ authors = [
]
requires-python = ">=3.11"
dependencies = [
"discord>=2.3.2",
"pyyaml>=6.0.2",
"red-discordbot>=3.5.20",
]
Generated
+14
View File
@@ -316,6 +316,18 @@ wheels = [
{ url = "https://files.pythonhosted.org/packages/d1/d6/3965ed04c63042e047cb6a3e6ed1a63a35087b6a609aa3a15ed8ac56c221/colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6", size = 25335, upload-time = "2022-10-25T02:36:20.889Z" },
]
[[package]]
name = "discord"
version = "2.3.2"
source = { registry = "https://pypi.org/simple" }
dependencies = [
{ name = "discord-py" },
]
sdist = { url = "https://files.pythonhosted.org/packages/7e/9f/0763429949416aeff9c6f33051270831b72e5582273acd28053b9b949462/discord-2.3.2.tar.gz", hash = "sha256:cc1ee2dbe6df218ca51519af355b97e87309f8230f58c7f34885feb8e8a76145", size = 1137, upload-time = "2023-08-10T21:45:07.93Z" }
wheels = [
{ url = "https://files.pythonhosted.org/packages/2d/38/d91ac49e8169b6c0f724f7aad26704eec07c4ecf31e067ca3d46a87e33d6/discord-2.3.2-py3-none-any.whl", hash = "sha256:d7959418799dd3b1e896685812d880169c193468b061b3431fa2a4664febd3da", size = 1132, upload-time = "2023-08-10T21:45:06.334Z" },
]
[[package]]
name = "discord-py"
version = "2.5.2"
@@ -343,12 +355,14 @@ name = "doge-cogs"
version = "0.1.0"
source = { editable = "." }
dependencies = [
{ name = "discord" },
{ name = "pyyaml" },
{ name = "red-discordbot" },
]
[package.metadata]
requires-dist = [
{ name = "discord", specifier = ">=2.3.2" },
{ name = "pyyaml", specifier = ">=6.0.2" },
{ name = "red-discordbot", specifier = ">=3.5.20" },
]