You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
asyncdefblacklist(context, mode : str, user : discord.User=None):
346
+
ifcontext.message.author.idinBLACKLIST:
347
+
embed=discord.Embed(title='You\'re blacklisted!',
348
+
description='Ask the owner to remove from the list if it was unfair.', color=0x00FF00)
349
+
awaitcontext.message.channel.send(embed=embed)
350
+
else:
351
+
ifcontext.message.author.idinOWNERS:
352
+
if (mode.lower() =="add"):
353
+
userID=user.id
354
+
try:
355
+
BLACKLIST.append(userID)
356
+
embed=discord.Embed(title="User Blacklisted", description='**{0}** has been successfully added to the blacklist'.format(user.name), color=0x00FF00)
357
+
embed.set_footer(text='There are now {0} users in the blacklist'.format(len(BLACKLIST)))
358
+
awaitcontext.message.channel.send(embed=embed)
359
+
except:
360
+
embed=discord.Embed(title=":x: Error!", description="An unknown error occurred when trying to add **{0}** to the blacklist.".format(user.name), color=0xFF0000)
361
+
awaitcontext.message.channel.send(embed=embed)
362
+
elif (mode.lower() =="remove"):
363
+
userID=user.id
364
+
try:
365
+
BLACKLIST.remove(userID)
366
+
embed=discord.Embed(title="User Unblacklisted",
367
+
description='**{0}** has been successfully removed from the blacklist'.format(
368
+
user.name), color=0x00FF00)
369
+
embed.set_footer(text='There are now {0} users in the blacklist'.format(len(BLACKLIST)))
370
+
awaitcontext.message.channel.send(embed=embed)
371
+
except:
372
+
embed=discord.Embed(title=":x: Error!",
373
+
description="An unknown error occurred when trying to remove **{0}** from the blacklist.\nAre you sure the user is in the blacklist?".format(
374
+
user.name), color=0xFF0000)
375
+
awaitcontext.message.channel.send(embed=embed)
376
+
elif (mode.lower() =="list"):
377
+
embed=discord.Embed(title="There are currently {0} blacklisted IDs".format(len(BLACKLIST)),
378
+
description="{0}".format(BLACKLIST),
379
+
color=0x00FF00)
380
+
awaitcontext.message.channel.send(embed=embed)
381
+
else:
382
+
embed=discord.Embed(title='Error!', description='You don\'t have the permission to use this command.',
embed=discord.Embed(title='**Command:** YOUR_PREFIX_HERE blacklist', description='**Description::** Prevents a user from using the bot \n **Usage:** YOUR_PREFIX_HERE blacklist [add/remove/list] [user] \n **Example:** YOUR_PREFIX_HERE blacklist add @RandomUser', color=0x00FF00)
426
+
awaitcontext.message.channel.send(embed=embed)
427
+
397
428
@ban.error
398
429
asyncdefban_error(context, error):
399
-
embed=discord.Embed(title='**Command:** YOUR_PREFIX_HERE ban', description='**Description:** Bans a member \n **Cooldown:** 5 second(s) \n **Usage:** YOUR_PREFIX_HERE ban [user] [reason] \n **Example:** YOUR_PREFIX_HERE ban @RandomUser Get out!', color=0x00FF00)
430
+
embed=discord.Embed(title='**Command:** YOUR_PREFIX_HERE ban', description='**Description:** Bans a member \n **Usage:** YOUR_PREFIX_HERE ban [user] [reason] \n **Example:** YOUR_PREFIX_HERE ban @RandomUser Get out!', color=0x00FF00)
400
431
awaitcontext.message.channel.send(embed=embed)
401
432
402
433
@poll.error
403
434
asyncdefpoll_error(context, error):
404
-
embed=discord.Embed(title='**Command:** YOUR_PREFIX_HERE poll', description='**Description:** Create a pool to vote \n **Cooldown:** 5 second(s) \n **Usage:** YOUR_PREFIX_HERE poll [idea] \n **Example:** YOUR_PREFIX_HERE poll Add new emojis!', color=0x00FF00)
435
+
embed=discord.Embed(title='**Command:** YOUR_PREFIX_HERE poll', description='**Description:** Create a pool to vote \n **Usage:** YOUR_PREFIX_HERE poll [idea] \n **Example:** YOUR_PREFIX_HERE poll Add new emojis!', color=0x00FF00)
405
436
awaitcontext.message.channel.send(embed=embed)
406
437
407
438
@eight_ball.error
408
439
asyncdefeight_ball_error(context, error):
409
-
embed=discord.Embed(title='**Command:** YOUR_PREFIX_HERE 8ball', description='**Description:** Get an answer to all of your questions \n **Cooldown:** 5 second(s) \n **Usage:** YOUR_PREFIX_HERE 8ball [question] \n **Example:** YOUR_PREFIX_HERE 8ball Is this bot cool?', color=0x00FF00)
440
+
embed=discord.Embed(title='**Command:** YOUR_PREFIX_HERE 8ball', description='**Description:** Get an answer to all of your questions \n **Usage:** YOUR_PREFIX_HERE 8ball [question] \n **Example:** YOUR_PREFIX_HERE 8ball Is this bot cool?', color=0x00FF00)
description='**Description:** I say what you say \n **Cooldown:** 0 second(s) \n **Usage:** YOUR_PREFIX_HERE say [message] \n **Example:** YOUR_PREFIX_HERE say Hello!!',
446
+
description='**Description:** I say what you say \n **Usage:** YOUR_PREFIX_HERE say [message] \n **Example:** YOUR_PREFIX_HERE say Hello!!',
description='**Description:** I say what you say as embed message \n **Cooldown:** 0 second(s) \n **Usage:** YOUR_PREFIX_HERE embed [message] \n **Example:** YOUR_PREFIX_HERE embed Hello!!',
454
+
description='**Description:** I say what you say as embed message \n **Usage:** YOUR_PREFIX_HERE embed [message] \n **Example:** YOUR_PREFIX_HERE embed Hello!!',
description='**Description:** Kicks a member \n **Cooldown:** 5 second(s) \n **Usage:** YOUR_PREFIX_HERE kick [user] [reason] \n **Example:** YOUR_PREFIX_HERE kick @RandomUser Rejoin when you\'ll be smarter, like me!',
462
+
description='**Description:** Kicks a member \n **Usage:** YOUR_PREFIX_HERE kick [user] [reason] \n **Example:** YOUR_PREFIX_HERE kick @RandomUser Rejoin when you\'ll be smarter, like me!',
description='**Description:** Delete a certain amount of messages \n **Cooldown:** 5 second(s) \n **Usage:** YOUR_PREFIX_HERE purge [numer of messages] \n **Example:** YOUR_PREFIX_HERE purge 20',
485
+
description='**Description:** Delete a certain amount of messages \n **Usage:** YOUR_PREFIX_HERE purge [numer of messages] \n **Example:** YOUR_PREFIX_HERE purge 20',
0 commit comments