Catch HTTPExceptions instead of BadRequest
This commit is contained in:
parent
b685823b79
commit
0e492938e7
1 changed files with 3 additions and 3 deletions
|
@ -8,7 +8,7 @@ import git
|
|||
import psutil
|
||||
from aiofile import AIOFile, LineReader
|
||||
from dis_snek import MessageContext, Scale, Snake
|
||||
from dis_snek.client.errors import BadRequest
|
||||
from dis_snek.client.errors import HTTPException
|
||||
from dis_snek.client.utils.misc_utils import find
|
||||
from dis_snek.models.discord.embed import EmbedField
|
||||
from dis_snek.models.discord.file import File
|
||||
|
@ -145,7 +145,7 @@ class BotutilCog(Scale):
|
|||
reloaded.append(module)
|
||||
|
||||
file_changes = {}
|
||||
for change in changes:
|
||||
for change in sorted(changes, key=lambda x: x.commit.committed_datetime, reverse=True):
|
||||
if change.commit.hexsha == current_hash:
|
||||
break
|
||||
files = change.commit.stats.files
|
||||
|
@ -205,7 +205,7 @@ class BotutilCog(Scale):
|
|||
self.logger.info("Updates applied")
|
||||
try:
|
||||
await ctx.reply(f"```ansi\n{capture.get()}\n```", embed=embed)
|
||||
except BadRequest:
|
||||
except HTTPException:
|
||||
await ctx.reply(f"Total Changes: {l_total}", embed=embed)
|
||||
|
||||
else:
|
||||
|
|
Loading…
Add table
Reference in a new issue