【发布时间】:2020-03-31 00:26:05
【问题描述】:
几天前我试图创建一个警告命令,一个 dm mass 类型,但不是发送给所有服务器用户,而是只发送几个人到一个特定的角色。
我只能创建一个批量 dm 命令
@commands.command()
async def all(self, ctx,*,message):
for mem in ctx.guild.members:
try:
await mem.send(message)
await ctx.send(f'**Sent dm to:** {mem.name}')
except:
await ctx.send(f'**User dm closed** {mem.name}')
print('User dm closed')
【问题讨论】:
标签: python python-3.x command discord.py discord.py-rewrite