def twitch_is_enabled(ctx): """ A command used to check if the guild has enabled twitch alert e.g. @commands.check(koalabot.is_admin) :param ctx: The context of the message :return: True if admin or test, False otherwise """ try: result = koalabot.check_guild_has_ext(ctx, "TwitchAlert") except PermissionError: result = False return result
def vote_is_enabled(ctx): """ A command used to check if the guild has enabled verify e.g. @commands.check(vote_is_enabled) :param ctx: The context of the message :return: True if enabled or test, False otherwise """ try: result = koalabot.check_guild_has_ext(ctx, "Vote") except PermissionError: result = False return result or (str(ctx.author) == koalabot.TEST_USER and koalabot.is_dpytest)
def text_filter_is_enabled(ctx): """ A command used to check if the guild has enabled TextFilter e.g. @commands.check(koalabot.is_admin) :param ctx: The context of the message :return: True if admin or test, False otherwise """ try: result = koalabot.check_guild_has_ext(ctx, "TextFilter") except PermissionError: result = False return result or (str(ctx.author) == koalabot.TEST_USER and koalabot.is_dpytest)