logs/common: haste bugfixes
This commit is contained in:
parent
c5b518e9c0
commit
dc39f42e12
2 changed files with 5 additions and 2 deletions
|
@ -146,6 +146,8 @@ class Common:
|
||||||
if response.status == 200:
|
if response.status == 200:
|
||||||
result_json = await response.json()
|
result_json = await response.json()
|
||||||
return f"{instance}{result_json['key']}"
|
return f"{instance}{result_json['key']}"
|
||||||
|
else:
|
||||||
|
return f"Error {response.status}: {response.text}"
|
||||||
|
|
||||||
async def async_call_shell(self, shell_command: str,
|
async def async_call_shell(self, shell_command: str,
|
||||||
inc_stdout=True, inc_stderr=True):
|
inc_stdout=True, inc_stderr=True):
|
||||||
|
|
|
@ -81,7 +81,7 @@ class Logs:
|
||||||
log_channel = self.bot.get_channel(config.log_channel)
|
log_channel = self.bot.get_channel(config.log_channel)
|
||||||
msg = "📝 **Message edit**: \n"\
|
msg = "📝 **Message edit**: \n"\
|
||||||
f"from {self.bot.escape_message(after.author.name)} "\
|
f"from {self.bot.escape_message(after.author.name)} "\
|
||||||
f"({after.author.id})\n"\
|
f"({after.author.id}), in {after.channel.mention}:\n"\
|
||||||
f"`{before.clean_content}` → `{after.clean_content}`"
|
f"`{before.clean_content}` → `{after.clean_content}`"
|
||||||
|
|
||||||
# If resulting message is too long, upload to hastebin
|
# If resulting message is too long, upload to hastebin
|
||||||
|
@ -99,7 +99,8 @@ class Logs:
|
||||||
log_channel = self.bot.get_channel(config.log_channel)
|
log_channel = self.bot.get_channel(config.log_channel)
|
||||||
msg = "🗑️ **Message delete**: \n"\
|
msg = "🗑️ **Message delete**: \n"\
|
||||||
f"from {self.bot.escape_message(message.author.name)} "\
|
f"from {self.bot.escape_message(message.author.name)} "\
|
||||||
f"({message.author.id})\n `{message.clean_content}`"
|
f"({message.author.id}), in {message.channel.mention}:\n"\
|
||||||
|
f"`{message.clean_content}`"
|
||||||
|
|
||||||
# If resulting message is too long, upload to hastebin
|
# If resulting message is too long, upload to hastebin
|
||||||
if len(msg) > 2000:
|
if len(msg) > 2000:
|
||||||
|
|
Loading…
Reference in a new issue