【发布时间】:2021-11-20 17:17:21
【问题描述】:
它在我最初的几次工作中奏效了。这是随机的。它有时会工作或失败,并显示“交互失败”。主要是失败。请帮忙。
from discord_slash import SlashCommand
client = commands.Bot(command_prefix='!', intents=intents)
slash = SlashCommand(client, sync_commands=True)
@slash.slash(description='Ping.')
async def ping(ctx):
await ctx.send(f'Current speed - {round(client.latency * 1000)}')
【问题讨论】:
标签: python discord discord.py