diff --git a/README.md b/README.md index dda4822..209e0d0 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ -# Modumind -Discord booru bot with a side of management and tasking +# Modufur +Discord booru bot with a side of management and tasking. Credits: Rapptz/discord.py diff --git a/src/misc/checks.py b/src/misc/checks.py index 06d1038..9761f86 100644 --- a/src/misc/checks.py +++ b/src/misc/checks.py @@ -1,52 +1,52 @@ -import asyncio -import json -import traceback -from contextlib import suppress - -import discord as d -from discord import errors as err -from discord.ext import commands -from discord.ext.commands import errors as errext - -from utils import utils as u - -owner_id = u.config['owner_id'] -ready = False - - -def is_owner(): - async def predicate(ctx): - return ctx.message.author.id == owner_id - return commands.check(predicate) - - -def is_admin(): - def predicate(ctx): - return ctx.message.author.guild_permissions.administrator - return commands.check(predicate) - - -def is_mod(): - def predicate(ctx): - return ctx.message.author.guild_permissions.ban_members - return commands.check(predicate) - - -def owner(ctx): - return ctx.message.author.id == owner_id - - -def admin(ctx): - return ctx.message.author.guild_permissions.administrator - - -def mod(ctx): - return ctx.message.author.guild_permissions.ban_members - - -def is_nsfw(): - def predicate(ctx): - if isinstance(ctx.message.channel, d.TextChannel): - return ctx.message.channel.is_nsfw() - return True - return commands.check(predicate) +import asyncio +import json +import traceback +from contextlib import suppress + +import discord as d +from discord import errors as err +from discord.ext import commands +from discord.ext.commands import errors as errext + +from utils import utils as u + +owner_id = u.config['owner_id'] +ready = False + + +def is_owner(): + async def predicate(ctx): + return ctx.message.author.id == owner_id + return commands.check(predicate) + + +def is_admin(): + def predicate(ctx): + return ctx.message.author.guild_permissions.administrator + return commands.check(predicate) + + +def is_mod(): + def predicate(ctx): + return ctx.message.author.guild_permissions.ban_members + return commands.check(predicate) + + +def owner(ctx): + return ctx.message.author.id == owner_id + + +def admin(ctx): + return ctx.message.author.guild_permissions.administrator + + +def mod(ctx): + return ctx.message.author.guild_permissions.ban_members + + +def is_nsfw(): + def predicate(ctx): + if isinstance(ctx.message.channel, d.TextChannel): + return ctx.message.channel.is_nsfw() + return True + return commands.check(predicate)