<commit_before>from discord.ext import commands
from __main__ import botdata

#
# This is a "heavily" modified version of checks.py, originally made by Rapptz
#
#                 https://github.com/Rapptz
#          https://github.com/Rapptz/RoboDanny/tree/async
#

def is_owner_check(author):
    return author.id == '1<PASSWORD>'

def is_owner():
    return commands.check(lambda ctx: is_owner_check(ctx.message.author))

def is_admin_check(channel, author):
	if is_owner_check(author):
		return True
	if channel.is_private:
		return False # All admin commands should be server specific and not work on PM channels
	
	perms = channel.permissions_for(author)
	return perms.administrator

def is_admin():
	return commands.check(lambda ctx: is_admin_check(ctx.message.channel, ctx.message.author))

def is_not_PM():
	return commands.check(lambda ctx: not ctx.message.channel.is_private)<commit_msg>added log for when admin check fials<commit_after>from discord.ext import commands
from __main__ import botdata

#
# This is a "heavily" modified version of checks.py, originally made by Rapptz
#
#                 https://github.com/Rapptz
#          https://github.com/Rapptz/RoboDanny/tree/async
#

def is_owner_check(author):
    return author.id == '15215<PASSWORD>232310272'

def is_owner():
    return commands.check(lambda ctx: is_owner_check(ctx.message.author))

def is_admin_check(channel, author):
	if is_owner_check(author):
		return True
	if channel.is_private:
		return False # All admin commands should be server specific and not work on PM channels
	
	perms = channel.permissions_for(author)
	if not perms.administrator:
		print("admin check failed")
	return perms.administrator

def is_admin():
	return commands.check(lambda ctx: is_admin_check(ctx.message.channel, ctx.message.author))

def is_not_PM():
	return commands.check(lambda ctx: not ctx.message.channel.is_private)
{'fraction_non_alphanumeric': 0.09528851244044469, 'fraction_numerical': 0.007940709370037057, 'mean_word_length': 4.510204081632653, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2055877', 'n_tokens_mistral': 615, 'n_tokens_neox': 589, 'n_words': 161}