Conditions | 1 |
Total Lines | 15 |
Code Lines | 3 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | """Shared functions between cogs and main program""" |
||
12 | async def check_admin(ctx) -> bool: |
||
13 | """check_admin |
||
14 | --- |
||
15 | Checks to see if message author is in bot_admins |
||
16 | |||
17 | Arguments: |
||
18 | --- |
||
19 | ctx {discord.ext.commands.Context} -- Context of which the check was called. |
||
20 | |||
21 | Returns: |
||
22 | --- |
||
23 | bool -- Returns 'TRUE' if the message author is in bot_admins. |
||
24 | """ |
||
25 | returned = [int(user_id) for user_id in await fetch("bot_admins", "id")] |
||
26 | return ctx.message.author.id in returned |
||
27 | |||
68 |