#MassDM Command
@bot.command()
async def massdm(ctx, msg):
await ctx.message.delete()
show_cursor()
wipeinput = input(Fore.RED+"Are you sure you want to mass dm? (WARNING: This happens really fast so it will probably flag your account)(y or n): ")
hide_cursor()
if wipeinput == "y" or wipeinput == "Y":
for user in ctx.guild.members:
if user != bot.user:
try:
channel = await user.create_dm()
await channel.send(msg)
print(Fore.GREEN + f'Sent to user "{user.name}"')
except:
print(Fore.YELLOW + f'Failed to DM user "{user.name}"')
pass
print(Fore.GREEN+"Finished")
当我运行它时,它只是说“完成”并且不做任何事情。当我删除尝试/除了它没有错误?我认为我已经设置了所有正确的意图