diff --git a/exts/git.py b/exts/git.py index 0c09848..dc4e82f 100644 --- a/exts/git.py +++ b/exts/git.py @@ -48,20 +48,21 @@ class Git: @git.command() @commands.is_owner() async def pull(self, ctx): - em = discord.Embed(style='rich', - title=f'Git Pull', - color=self.bot.embed_color) - 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/$(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) - for page in results[:5]: - em.add_field(name='￲', value=f'{page}') + async with ctx.typing(): + em = discord.Embed(style='rich', + title=f'Git Pull', + color=self.bot.embed_color) + 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/$(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) + for page in results[:5]: + em.add_field(name='￲', value=f'{page}') await ctx.send(embed=em) @git.command()