# 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 discord
import PIL.Image
import numpy as np
from io import BytesIO
from discord.ext import commands
from wordcloud import WordCloud, ImageColorGenerator
from mods.cog import Cog

			if not get_images:
				return
			custom = True
			image, scale, scale_msg = get_images
			image = await self.bytes_download(image[0])
			if scale:
				max_messages = int(scale)
		if max_messages > 4000 or max_messages < 1:
			max_messages = 500
		x = await self.bot.say("ok, processing{0}".format(' (this might take a while)' if max_messages > 2000 else ''))				
		text = await self.get_messages(ctx.message.channel, max_messages)
		if custom:
			b = await self.bot.loop.run_in_executor(None, self.make_wc_custom, image, text, max_messages)
		else:
			b = await self.bot.loop.run_in_executor(None, self.make_wc, text, max_messages)
		if type(b) == str:
			await self.bot.say(b)
		else:
			await self.bot.upload(b, filename='wordcloud.png')
		await self.bot.delete_message(x)

	@wc.command(name='user', pass_context=True, aliases=['u'])
	@commands.cooldown(10, 1)
	async def wc_user(self, ctx, user:discord.User, max_messages:int=500):
		if max_messages > 4000 or max_messages < 1:
			max_messages = 500
		x = await self.bot.say("ok, processing{0}".format(' (this might take a while)' if max_messages > 2000 else ''))				
		text = await self.get_messages(ctx.message.channel, max_messages, user=user.id)
		b = await self.bot.loop.run_in_executor(None, self.make_wc, text, max_messages)
		await self.bot.upload(b, filename='wordcloud.png')

# 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/Wc.py
import discord
import PIL.Image
import numpy as np
from io import BytesIO
from discord.ext import commands
from wordcloud import WordCloud, ImageColorGenerator
from mods.cog import Cog

			if not get_images:
				return
			custom = True
			image, scale, scale_msg = get_images
			image = await self.bytes_download(image[0])
			if scale:
				max_messages = int(scale)
		if max_messages > 4000 or max_messages < 1:
			max_messages = 500
		x = await self.bot.say("ok, processing{0}".format(' (this might take a while)' if max_messages > 2000 else ''))				
		text = await self.get_messages(ctx.message.channel, max_messages)
		if custom:
			b = await self.bot.loop.run_in_executor(None, self.make_wc_custom, image, text, max_messages)
		else:
			b = await self.bot.loop.run_in_executor(None, self.make_wc, text, max_messages)
		if type(b) == str:
			await self.bot.say(b)
		else:
			await self.bot.upload(b, filename='wordcloud.png')
		await self.bot.delete_message(x)

	@wc.command(name='user', pass_context=True, aliases=['u'])
	@commands.cooldown(10, 1)
	async def wc_user(self, ctx, user:discord.User, max_messages:int=500):
		if max_messages > 4000 or max_messages < 1:
			max_messages = 500
		x = await self.bot.say("ok, processing{0}".format(' (this might take a while)' if max_messages > 2000 else ''))				
		text = await self.get_messages(ctx.message.channel, max_messages, user=user.id)
		b = await self.bot.loop.run_in_executor(None, self.make_wc, text, max_messages)
		await self.bot.upload(b, filename='wordcloud.png')

		await self.bot.delete_message(x)
