Merge branch 'development' of github.com:dustinpianalto/Geeksbot into development

release-1.0.0
DustyP 8 years ago
commit c53fd11789

@ -80,22 +80,22 @@ class Fun:
a = a * (i + 1) a = a * (i + 1)
return a return a
# @commands.command() @commands.command()
# @commands.cooldown(1, 5, type=commands.BucketType.user) @commands.cooldown(1, 5, type=commands.BucketType.user)
# async def fact(self, ctx, number:int): async def fact(self, ctx, number:int):
# if number < 20001 and number > 0: if number < 20001 and number > 0:
# n = 1990 n = 1990
# with ctx.channel.typing(): with ctx.channel.typing():
# a = await self.bot.loop.run_in_executor(None, self.get_factorial, number) a = await self.bot.loop.run_in_executor(None, self.get_factorial, number)
# if len(str(a)) > 6000: if len(str(a)) > 6000:
# for b in [str(a)[i:i+n] for i in range(0, len(str(a)), n)]: for b in [str(a)[i:i+n] for i in range(0, len(str(a)), n)]:
# await ctx.author.send(f'```py\n{b}```') await ctx.author.send(f'```py\n{b}```')
# await ctx.send(f"{ctx.author.mention} Check your DMs.") await ctx.send(f"{ctx.author.mention} Check your DMs.")
# else: else:
# for b in [str(a)[i:i+n] for i in range(0, len(str(a)), n)]: for b in [str(a)[i:i+n] for i in range(0, len(str(a)), n)]:
# await ctx.send(f'```py\n{b}```') await ctx.send(f'```py\n{b}```')
# else: else:
# await ctx.send("Invalid number. Please enter a number between 0 and 20,000") await ctx.send("Invalid number. Please enter a number between 0 and 20,000")
@commands.command(hidden=True) @commands.command(hidden=True)
@commands.is_owner() @commands.is_owner()
@ -153,9 +153,9 @@ class Fun:
trans = await self.bot.db_con.fetchval('select code from geeksbot_emojis where id = 405943174809255956') trans = await self.bot.db_con.fetchval('select code from geeksbot_emojis where id = 405943174809255956')
msg = await ctx.send(f'{member.mention}{trans*20}{self.bot.unicode_emojis["left_fist"]}') msg = await ctx.send(f'{member.mention}{trans*20}{self.bot.unicode_emojis["left_fist"]}')
for i in range(21): for i in range(4):
await asyncio.sleep(0.1) await asyncio.sleep(0.1)
await msg.edit(content=f'{member.mention}{trans*(20-i)}{self.bot.unicode_emojis["left_fist"]}') await msg.edit(content=f'{member.mention}{trans*(20-(i*5))}{self.bot.unicode_emojis["left_fist"]}')
await asyncio.sleep(0.1) await asyncio.sleep(0.1)
await msg.edit(content=f'{self.bot.unicode_emojis["boom"]}') await msg.edit(content=f'{self.bot.unicode_emojis["boom"]}')
await asyncio.sleep(0.5) await asyncio.sleep(0.5)

@ -5,8 +5,6 @@ import logging
from datetime import datetime from datetime import datetime
import json import json
import aiohttp import aiohttp
from postgres import Postgres
from collections import deque
from googleapiclient.discovery import build from googleapiclient.discovery import build
import asyncpg import asyncpg
from concurrent import futures from concurrent import futures
@ -157,8 +155,6 @@ async def on_message(ctx):
async def on_ready(): async def on_ready():
if bot.db_con is None: await bot.connect_db() if bot.db_con is None: await bot.connect_db()
bot.recent_msgs = {} bot.recent_msgs = {}
for guild in bot.guilds:
bot.recent_msgs[guild.id] = deque(maxlen=50)
logging.info('Logged in as {0.name}|{0.id}'.format(bot.user)) logging.info('Logged in as {0.name}|{0.id}'.format(bot.user))
load_list = bot.bot_config['load_list'] load_list = bot.bot_config['load_list']
for load_item in load_list: for load_item in load_list:

Loading…
Cancel
Save