Esempio n. 1
0
	async def barrel(self, ctx, user: Member = None):
		"""Have Sweetie Bot dig around in Kazilii's mysterious Barrel! Who knows what you might get? Specify a user to give them an item instead."""

		obj = RNG(await self.config.barrel.get_raw('objects'))
		resp = RNG(await self.config.barrel.get_raw('response'))
		author = ctx.author
		if user is not None:
			await ctx.send(resp.format(object=obj, user=user.display_name, author=author.display_name))
		else:
			await ctx.send(resp.format(object=obj, user=author.display_name, author=author.display_name))
Esempio n. 2
0
    def __init__(self, seed=None):
        self.rng = RNG()
        self.rng.seed(seed)

        self.randint_min = None
        self.randint_max = None
        self.randint_step = None

        self.uniform_min = None
        self.uniform_max = None
Esempio n. 3
0
	async def sleep(self, ctx, user: Member=None):
		"You should reall be sleeping right now!"

		author = ctx.author.display_name

		if user is not None:
			user = user.display_name
		else:
			user = author
		await ctx.send(RNG(['***NO {user}! WHAT ARE YOU DOING!? GO TO SLEEP! GOSH!***'.format(user=user.upper()),
							'***NO {user}, GO TO SLEEP, JEEZ, WHY ARE YOU STILL UP!?***'.format(user=user.upper())]))
Esempio n. 4
0
 async def platinum(self, ctx):
     """Platinum is just the funnest to be around ~~*no really, we love you platinum*~~"""
     fp = RNG([PATH + 'platinum1.jpg', PATH + 'platinum2.png'])
     await ctx.send(file=File(fp=fp))
Esempio n. 5
0
	async def on_message(self, message):
		if message.guild is None:
			return
		if message.author == self.bot.user:
			return

		if not self.statuscheck(message):
			game = Game(name='^help')
			await self.bot.change_presence(activity=game)

		channel = message.channel
		author = message.author
		mayoyes = 'is mayonnaise an instrument'
		mayoyesalt = 'is mayo an instrument'
		content = message.content.lower()

		guild = self.config.guild(message.guild)
		glob = self.config

		if content.startswith(mayoyes.lower()) or content.startswith(mayoyesalt.lower()):
			self.mayo = True
			self.start_time = time.time()
			await message.channel.send('No {}. Mayonnaise is not an instrument.'.format(author.mention))

		if (content.startswith('raises'.lower()) or content.startswith('_raises'.lower()) or content.startswith(
				'*raises'.lower())) and (self.mayo == True):
			if time.time() - self.start_time < 30:
				self.mayo = False
				self.start_time = None
				await message.channel.send('Horseradish is not an instrument either.')
			else:
				self.start_time = None
				self.mayo = False

		if not await guild.get_raw('reactionconf', 'enabled'):
			return

		if await guild.get_raw('reactionconf', 'guildonly'):
			for x in await glob.reactions():
				if x in message.content:
					await message.add_reaction(await glob.get_raw('reactions', x))

			for x in await glob.eh():
				if message.content.casefold().endswith(x.casefold()):
					chance = RNG(0, 100)
					if chance < 10:
						await message.add_reaction(':timhortons:365313496872779776')
					else:
						await message.add_reaction('\U0001F341')

			for x in await glob.canada():
				if x.casefold() in message.content.casefold():
					chance = RNG(0, 100)
					if chance < 10:
						await message.add_reaction(':timhortons:365313496872779776')
					else:
						await message.add_reaction('\U0001F341')

		for x in await guild.get_raw('reactions'):
			if x.lower() in message.content.lower():
				await message.add_reaction(await guild.get_raw('reactions', x))
Esempio n. 6
0
	async def platinum(self, ctx):
		fp = RNG([PATH + 'platinum1.jpg', PATH + 'platinum2.png'])
		await ctx.send(file=File(fp=fp))