def wakeup(self, ctx):
"""A way to get your friends off of their lazy butts and wake up.
**Usage:** `g_wakeup <user(s)>`
**Permission:** User"""
img = ["./images/wakeupa.gif", "./images/wakeupb.gif", "./images/wakeupc.gif", "./images/wakeupd.gif", "./images/wakeupe.gif", "./images/wakeupf.gif", "./images/wakeupg.gif", "./images/wakeuph.gif"]
var = int(random.random() * len(img))
if len(ctx.message.mentions) == 0:
await ctx.send(":x: You must mention a user!")
elif len(ctx.message.mentions) > 0:
ments = ""
for x in range(0, len(ctx.message.mentions)):
if ctx.message.mentions[x].id == ctx.message.author.id:
msg = '<:morning:319631823766552597> What are you trying to wake up? Well, you do you I guess.'
await ctx.send(file=discord.File(img[var]), content=msg)
return
if x == 0:
ments = ctx.message.mentions[x].display_name
elif x == len(ctx.message.mentions) - 1:
if len(ctx.message.mentions) == 2:
ments = ments+" and "+ctx.message.mentions[x].display_name
else:
ments = ments+", and "+ctx.message.mentions[x].display_name
else:
ments = ments+", "+ctx.message.mentions[x].display_name
msg = '<:morning:319631823766552597> **' + ments + '**, rise and shine! **' + ctx.message.author.display_name + '** wants you to wake up!'
await ctx.send(file=discord.File(img[var]), content=msg)
else:
await ctx.send("An unexpected error occurred. Please report this to Desiree#3658 on the support guild, link found in g!about.") # just in case. You never know shrug
评论列表
文章目录