This commit is contained in:
Alex D
2023-04-24 17:45:20 +03:00
parent 56c1ebefd3
commit 4731006753
18 changed files with 371 additions and 94 deletions
+22
View File
@@ -0,0 +1,22 @@
import disnake
from disnake.ext import commands
class PingCommands(commands.Cog):
def __init__(self, bot):
self.bot = bot
@commands.has_any_role(1091637465858715648)
@commands.slash_command()
async def ping(self, ctx: disnake.AppCommandInteraction):
if disnake.utils.get(ctx.author.roles, id=1091637465858715648):
if ctx.channel.id == 1060544039767789639:
await ctx.send("Понг!")
else:
await ctx.send('Вы не можете использовать эту команду в текущем канале.')
else:
await ctx.send(f'{ctx.author.mention}, у вас нет роли <@&1060541642450411560>.')
def setup(bot):
bot.add_cog(PingCommands(bot))