mirror of https://github.com/stijndcl/didier
parent
afca7bb451
commit
0c83472287
|
@ -114,6 +114,8 @@ class Events(commands.Cog):
|
|||
# Someone forgot an argument or passed an invalid argument
|
||||
elif isinstance(err, (commands.BadArgument, commands.MissingRequiredArgument)):
|
||||
await ctx.send("Controleer je argumenten.")
|
||||
elif isinstance(err, commands.MessageNotFound):
|
||||
await ctx.send("Geen bericht gevonden dat overeenkomt met het opgegeven argument.")
|
||||
else:
|
||||
# Remove the InvokeCommandError because it's useless information
|
||||
x = traceback.format_exception(type(err), err, err.__traceback__)
|
||||
|
|
|
@ -84,6 +84,18 @@ class School(commands.Cog):
|
|||
schedule.append(val)
|
||||
return schedule
|
||||
|
||||
@commands.command(name="Pin", usage="[Message]")
|
||||
@help.Category(category=Category.School)
|
||||
async def pin(self, ctx, message: discord.Message):
|
||||
# In case people abuse, check if they're blacklisted
|
||||
blacklist = []
|
||||
|
||||
if ctx.author.id in blacklist:
|
||||
return
|
||||
|
||||
await ctx.message.add_reaction("✅")
|
||||
await message.pin(reason="Didier Pin door {}".format(ctx.author.display_name))
|
||||
|
||||
|
||||
def setup(client):
|
||||
client.add_cog(School(client))
|
||||
|
|
|
@ -123,13 +123,6 @@ Used in stats.py - Stats commands. Tracks the user's personal stats to award ach
|
|||
12 xp: bigint, default 0 | The amount of message xp the user has gained
|
||||
13 last_message: bigint, default 0 | The timestamp of the user's last message that awarded xp
|
||||
|
||||
### pin
|
||||
|
||||
Used in school.py - Pin command. Keeps track of which messages have been requested for a pin.
|
||||
|
||||
0 messageid: bigint, unique, primary key | The id of the message being tracked
|
||||
1 reactions: integer, default 0 | The amount of votes for this message
|
||||
|
||||
### poke
|
||||
|
||||
Used in poke.py - Poke commands. Keeps track of the currently poked person.
|
||||
|
|
|
@ -68,6 +68,7 @@
|
|||
"muttn": "Kiekt oeveel van ne muttn da [@Persoon] wel nie es aje eenen tagt, anders ist uzelf.",
|
||||
"neck": "<:WhatDidYou:744476950654877756><:DoTo:744476965951504414><:MyDrink:744476979939508275>",
|
||||
"nightly": "Daily is overrated.\nClaim jouw dagelijkse bonus Didier Dinks.",
|
||||
"pin": "Pin [Message] zodat je geen admins hoeft te pingen. Misbruik kan je blacklisten.",
|
||||
"pjoke": "Didier vertelt een programming joke.",
|
||||
"poke": "Tik [Persoon].",
|
||||
"poke blacklist": "Indien je liever niet aan Poke wil deelnemen, kan je jezelf op deze manier blacklisten.\nIndien je jezelf wil ont-blacklisten stuur je een DM naar DJ STIJN (om misbruik tegen te gaan).",
|
||||
|
|
Loading…
Reference in New Issue