禁言全员

将频道内全部成员(非管理员)禁言。

使用示例

import botpy

from botpy.message import Message

class MyClient(botpy.Client):
    async def on_at_message_create(self, message: Message):
        await self.api.mute_all(guild_id="xxxx", mute_end_timestamp="xxxx", mute_seconds="xxxx")

intents = botpy.Intents(public_guild_messages=True)
client = MyClient(intents=intents)
client.run(appid={appid}, token={token})

参数说明

字段名必填类型描述
guild_idstring频道 ID
mute_end_timestampstring禁言到期时间戳,绝对时间戳,单位:(与 seconds 字段同时赋值的话,以该字段为准)
mute_secondsstring禁言多少秒(两个字段二选一,默认以 mute_end_timstamp 为准

返回说明

成功返回空对象。

返回示例

data

True