def poke(self, ctx):
"""Do you ever have a friend who just wont stop ignoring you? Just poke them. :eyes:
**Usage:** `g_poke <user(s)>`
**Permission:** User"""
img = ["./images/pokea.gif", "./images/pokeb.gif", "./images/pokec.gif", "./images/poked.gif", "./images/pokee.gif", "./images/pokef.gif", "./images/pokeg.gif", "./images/pokeh.gif", "./images/pokei.gif", "./images/pokej.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 = ":eyes: You can't poke nothing! I'll poke you instead!"
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
if len(ctx.message.mentions) == 1:
pr = "was"
else:
pr = "were"
msg = ':eyes: **' + ments + '** ' + pr + ' poked by **' + ctx.message.author.display_name +'**!'
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
评论列表
文章目录