mirror of
https://github.com/stijndcl/didier.git
synced 2026-04-07 15:48:29 +02:00
parent
afca7bb451
commit
0c83472287
5 changed files with 15 additions and 7 deletions
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue