[bot-base] Ajout de la gestion des erreurs et des warns
[config] Modification de Channel pour éviter les Nones inutiles
This commit is contained in:
parent
75f524c509
commit
e48f74e592
@ -207,10 +207,10 @@ class BotBase(discord.Client):
|
||||
self.error(f"Error in {event_method}: \n{exc}")
|
||||
|
||||
# Logging
|
||||
def info(self, *args, **kwargs):
|
||||
def info(self, info, *args, **kwargs):
|
||||
if self.log:
|
||||
self.log.info(*args, **kwargs)
|
||||
self.dispatch("log_info", *args, **kwargs)
|
||||
self.log.info(info, *args, **kwargs)
|
||||
self.dispatch("log_info", info, *args, **kwargs)
|
||||
|
||||
def error(self, e, *args, **kwargs):
|
||||
if self.log:
|
||||
|
@ -36,7 +36,8 @@ class Channel(BaseType):
|
||||
self._update()
|
||||
|
||||
def get(self):
|
||||
self._update()
|
||||
if self.channel_instance is None:
|
||||
self._update()
|
||||
return self.channel_instance or self.value
|
||||
|
||||
def to_save(self):
|
||||
|
Loading…
Reference in New Issue
Block a user