如何让机器人在discord.py rewrite中为频道设置慢模式?

2024-09-29 19:24:14 发布

您现在位置:Python中文网/ 问答频道 /正文

如何让机器人在discord.py重写中为通道设置慢模式

我试过这样做:ctx.channel.slowmode_delay = 10

它没有得到任何错误,但是当我调用上面的命令时,没有应用slowmode

我还能做什么


Tags: py命令错误模式channel机器人ctxdelay
1条回答
网友
1楼 · 发布于 2024-09-29 19:24:14

下面是一个示例命令:

@bot.command()
async def setdelay(ctx, seconds: int):
    await ctx.channel.edit(slowmode_delay=seconds)
    await ctx.send(f"Set the slowmode delay in this channel to {seconds} seconds!")

参考文献:

相关问题 更多 >

    热门问题