mirror of
https://github.com/polyjitter/searchbot-discord.git
synced 2024-08-14 22:46:55 +00:00
Fix botlist
This commit is contained in:
parent
61c2f6aecd
commit
664e1361c5
4 changed files with 25 additions and 10 deletions
|
@ -22,22 +22,26 @@ class Logging():
|
|||
|
||||
# Sets info hook first
|
||||
self.info_hook = self.online.get_webhook(
|
||||
bot.config['HOOKS']['INFO_HOOK'] if bot.config['HOOKS']['INFO_HOOK']
|
||||
bot.config['HOOKS']['INFO_HOOK']
|
||||
if bot.config['HOOKS']['INFO_HOOK']
|
||||
else None
|
||||
)
|
||||
|
||||
# Sets other hooks or defaults them
|
||||
if self.info_hook:
|
||||
self.warn_hook = self.online.get_webhook(
|
||||
bot.config['HOOKS']['WARN_HOOK'] if bot.config['HOOKS']['WARN_HOOK']
|
||||
bot.config['HOOKS']['WARN_HOOK']
|
||||
if bot.config['HOOKS']['WARN_HOOK']
|
||||
else self.info_hook
|
||||
)
|
||||
self.error_hook = self.online.get_webhook(
|
||||
bot.config['HOOKS']['ERROR_HOOK'] if bot.config['HOOKS']['ERROR_HOOK']
|
||||
bot.config['HOOKS']['ERROR_HOOK']
|
||||
if bot.config['HOOKS']['ERROR_HOOK']
|
||||
else self.info_hook
|
||||
)
|
||||
self.debug_hook = self.online.get_webhook(
|
||||
bot.config['HOOKS']['DEBUG_HOOK'] if bot.config['HOOKS']['DEBUG_HOOK']
|
||||
bot.config['HOOKS']['DEBUG_HOOK']
|
||||
if bot.config['HOOKS']['DEBUG_HOOK']
|
||||
else self.info_hook
|
||||
)
|
||||
|
||||
|
@ -102,7 +106,9 @@ class Logging():
|
|||
if self.info_hook:
|
||||
return await self.info_hook.send(
|
||||
content=content,
|
||||
username=f"{self.bot.user.name} - {name if name else 'unknown'}",
|
||||
username=(
|
||||
f"{self.bot.user.name} - {name if name else 'unknown'}"
|
||||
),
|
||||
avatar_url=str(self.bot.user.avatar_url),
|
||||
embed=embed
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue