poke should be fixed now

pull/106/head
Jozef Jankaj 2022-02-15 10:19:46 +01:00
parent 781956b312
commit e828a67b0e
2 changed files with 20 additions and 4 deletions

View File

@ -78,18 +78,27 @@ class Poke(commands.Cog):
await self.client.get_cog("Leaderboards").callLeaderboard("poke", ctx)
async def pokeChecks(self, ctx):
# no mentions
if len(ctx.message.mentions) == 0:
await ctx.send("Dit is geen geldige persoon.")
return False
if len(ctx.message.mentions) > 1:
# more than one mention? Check if Didier is tagged first
if len(ctx.message.mentions) > 1 and str(ctx.message.mentions[0].id) not in constants.didier_identities:
await ctx.send("Je kan maar 1 persoon tegelijk tikken.")
return False
# author poking themselves
if ctx.message.mentions[0].id == ctx.author.id:
await ctx.send("Je kan jezelf niet tikken, {}.".format(ctx.author.display_name))
return False
# author poking didier
if ctx.message.mentions[0].id == self.client.user.id:
await ctx.send("Je kan me niet tikken, {}.".format(ctx.author.display_name))
return False
if len(ctx.message.mentions) == 1:
await ctx.send("Je kan me niet tikken, {}.".format(ctx.author.display_name))
return False
# author poking bots
if str(ctx.message.mentions[0].id) in constants.botIDs:
await ctx.send("Je kan geen bots tikken, {}.".format(ctx.author.display_name))
return False
@ -106,6 +115,7 @@ class Poke(commands.Cog):
await ctx.send("Deze persoon heeft zichzelf geblacklisted en kan niet meer getikt worden.")
return False
print("passed the function")
return True

View File

@ -3,6 +3,12 @@ from enum import Enum
myId = "171671190631481345"
didierId = "680510935164911730"
coolerDidierId = "728361496874057812"
didier_identities = ["680510935164911730", # Didier
"728361496874057812", # coolerDidier
"831899971686760558", # Communist Didier
]
botIDs = [
"155149108183695360",
"234395307759108106",
@ -11,7 +17,7 @@ botIDs = [
"679679176466235399",
"680510935164911730",
"706148003949314069",
"728361496874057812"
"728361496874057812",
]
BugReports = "762668401960812554"
BotTesting = "679701786189103106"