adding requirements.txt :)
This commit is contained in:
parent
face2aec39
commit
b0355cd332
2 changed files with 20 additions and 0 deletions
19
ext/test2.py
Normal file
19
ext/test2.py
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
# pybot-f 2nd test extension ... other type of commands (this time, nogroup commands)
|
||||||
|
# this code has been copied from the docs/github
|
||||||
|
|
||||||
|
import discord
|
||||||
|
from discord import app_commands
|
||||||
|
from discord.ext import commands
|
||||||
|
|
||||||
|
class Test2Cog(commands.Cog):
|
||||||
|
def __init__(self, bot: commands.Bot) -> None:
|
||||||
|
self.bot = bot
|
||||||
|
|
||||||
|
@app_commands.command(name="command-1")
|
||||||
|
async def my_command(self, interaction: discord.Interaction) -> None:
|
||||||
|
""" /command-1 """
|
||||||
|
await interaction.response.send_message("Hello from command 1!", ephemeral=True)
|
||||||
|
|
||||||
|
|
||||||
|
async def setup(bot: commands.Bot) -> None:
|
||||||
|
await bot.add_cog(Test2Cog(bot))
|
1
requirements.txt
Normal file
1
requirements.txt
Normal file
|
@ -0,0 +1 @@
|
||||||
|
git+https://github.com/Rapptz/discord.py#egg=discord.py[voice]
|
Loading…
Add table
Reference in a new issue