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

This commit is contained in:
Dusty.P
2018-04-20 20:23:16 -08:00
5 changed files with 27 additions and 18 deletions
+3 -1
View File
@@ -28,7 +28,9 @@ class Git:
em.set_thumbnail(url=f'{ctx.guild.me.avatar_url}')
result = await asyncio.wait_for(self.bot.loop.create_task(run_command('git fetch --all')), 120) + '\n'
result += await asyncio.wait_for(self.bot.loop.create_task(run_command('git reset --hard '
'origin/master')), 120) + '\n\n'
'origin/$(git '
'rev-parse --symbolic-full-name'
'--abbrev-ref HEAD)')), 120) + '\n\n'
result += await asyncio.wait_for(self.bot.loop.create_task(run_command('git show --stat | '
'sed "s/.*@.*[.].*/ /g"')), 10)
results = paginate(result, maxlen=1014)
+2
View File
@@ -91,3 +91,5 @@ async def run_command(args):
stdout, stderr = await process.communicate()
# Return stdout
return stdout.decode().strip()
# TODO Add Paginator
+1 -1
View File
@@ -159,7 +159,7 @@ class Repl:
if ctx.author.id != ownerid:
return
try:
body = self.cleanup_code(body).split(' ')
body = self.cleanup_code(body)
result = await asyncio.wait_for(self.bot.loop.create_task(run_command(body)), 10)
value = result
for page in paginate(value):
+3
View File
@@ -499,6 +499,7 @@ class Utils:
em.title = f'Google Search'
em.description = f'Top 4 results for "{search}"'
em.colour = embed_color
# TODO Fix layout of Results
for result in results:
em.add_field(name=f'{result["title"]}', value=f'{result["snippet"]}\n{result["link"]}')
await ctx.send(embed=em)
@@ -528,6 +529,8 @@ class Utils:
value=f'Steam ID: {steam[i]}\nPatreon Level: {tier[i]}\nPatron of: {patron[i]}')
await ctx.send(embed=em)
# TODO Create Help command
def setup(bot):
bot.add_cog(Utils(bot))