# Path: utils/checks.py
# class No_Owner(commands.CommandError): pass
# class No_Perms(commands.CommandError): pass
# class No_Role(commands.CommandError): pass
# class No_Admin(commands.CommandError): pass
# class No_Mod(commands.CommandError): pass
# class No_Sup(commands.CommandError): pass
# class No_ServerandPerm(commands.CommandError): pass
# class Nsfw(commands.CommandError): pass
# def is_owner_check(message):
# def is_owner():
# def check_permissions(ctx, perms):
# def role_or_perm(t, ctx, check, **perms):
# def mod_or_perm(**perms):
# 	def predicate(ctx):
# def admin_or_perm(**perms):
# 	def predicate(ctx):
# def is_in_servers(*server_ids):
# 	def predicate(ctx):
# def server_and_perm(ctx, *server_ids, **perms):
# def sup(ctx):
# def nsfw():
# 	def predicate(ctx):
# 
# Path: mods/cog.py
# class Cog(metaclass=CogMeta):
# 	def __init__(self, bot:NotSoBot):
# 		self._bot = bot
# 
# 	@property
# 	def bot(self):
# 		return self._bot
# 
# 	@classmethod
# 	def setup(cls, bot:NotSoBot):
# 		bot.add_cog(cls(bot))


import asyncio, discord, aiohttp
import re, io, random, datetime
from discord.ext import commands
from utils import checks
from mods.cog import Cog
		await self.bot.say("ok, gave {2} `{0}` the role {1}".format(", ".join(idk), role.name, 'user' if len(users) == 1 else 'users'))

	@commands.command(pass_context=True, no_pm=True)
	@checks.admin_or_perm(manage_server=True)
	async def removerole(self, ctx, role:discord.Role, *users:discord.User):
		"""Remove a role from x users"""
		if ctx.message.server.me.permissions_in(ctx.message.channel).manage_roles == False:
			await self.bot.say("Sorry, I do not have the manage_roles permission\n**Aborting**")
			return
		if len(users) == 0:
			await self.bot.say("You need to add a person to remove the role from!")
		idk = []
		for user in users:
			await self.bot.remove_roles(user, role)
			idk.append(user.name)
		await self.bot.say("ok, removed the role {0} from {2} `{1}`".format(role.name, ', '.join(idk), 'user' if len(users) == 1 else 'users'))

	@commands.command(pass_context=True, no_pm=True)
	@checks.admin_or_perm(manage_server=True)
	async def deleterole(self, ctx, *roles:discord.Role):
		"""Delete a role"""
		if ctx.message.server.me.permissions_in(ctx.message.channel).manage_roles == False:
			await self.bot.say("Sorry, I do not have the manage_roles permission\n**Aborting**")
			return
		server = ctx.message.server
		for role in roles:
			await self.bot.delete_role(server,role)
			await self.bot.say("ok, deleted the role `{0}` from the server".format(role.name))

	@commands.command(pass_context=True, no_pm=True)

# Path: utils/checks.py
# class No_Owner(commands.CommandError): pass
# class No_Perms(commands.CommandError): pass
# class No_Role(commands.CommandError): pass
# class No_Admin(commands.CommandError): pass
# class No_Mod(commands.CommandError): pass
# class No_Sup(commands.CommandError): pass
# class No_ServerandPerm(commands.CommandError): pass
# class Nsfw(commands.CommandError): pass
# def is_owner_check(message):
# def is_owner():
# def check_permissions(ctx, perms):
# def role_or_perm(t, ctx, check, **perms):
# def mod_or_perm(**perms):
# 	def predicate(ctx):
# def admin_or_perm(**perms):
# 	def predicate(ctx):
# def is_in_servers(*server_ids):
# 	def predicate(ctx):
# def server_and_perm(ctx, *server_ids, **perms):
# def sup(ctx):
# def nsfw():
# 	def predicate(ctx):
# 
# Path: mods/cog.py
# class Cog(metaclass=CogMeta):
# 	def __init__(self, bot:NotSoBot):
# 		self._bot = bot
# 
# 	@property
# 	def bot(self):
# 		return self._bot
# 
# 	@classmethod
# 	def setup(cls, bot:NotSoBot):
# 		bot.add_cog(cls(bot))


# Path: mods/Moderation.py
import asyncio, discord, aiohttp
import re, io, random, datetime
from discord.ext import commands
from utils import checks
from mods.cog import Cog

		await self.bot.say("ok, gave {2} `{0}` the role {1}".format(", ".join(idk), role.name, 'user' if len(users) == 1 else 'users'))

	@commands.command(pass_context=True, no_pm=True)
	@checks.admin_or_perm(manage_server=True)
	async def removerole(self, ctx, role:discord.Role, *users:discord.User):
		"""Remove a role from x users"""
		if ctx.message.server.me.permissions_in(ctx.message.channel).manage_roles == False:
			await self.bot.say("Sorry, I do not have the manage_roles permission\n**Aborting**")
			return
		if len(users) == 0:
			await self.bot.say("You need to add a person to remove the role from!")
		idk = []
		for user in users:
			await self.bot.remove_roles(user, role)
			idk.append(user.name)
		await self.bot.say("ok, removed the role {0} from {2} `{1}`".format(role.name, ', '.join(idk), 'user' if len(users) == 1 else 'users'))

	@commands.command(pass_context=True, no_pm=True)
	@checks.admin_or_perm(manage_server=True)
	async def deleterole(self, ctx, *roles:discord.Role):
		"""Delete a role"""
		if ctx.message.server.me.permissions_in(ctx.message.channel).manage_roles == False:
			await self.bot.say("Sorry, I do not have the manage_roles permission\n**Aborting**")
			return
		server = ctx.message.server
		for role in roles:
			await self.bot.delete_role(server,role)
			await self.bot.say("ok, deleted the role `{0}` from the server".format(role.name))

	@commands.command(pass_context=True, no_pm=True)

	@checks.admin_or_perm(manage_server=True)