Module discord_lumberjack.handlers.discord_channel_handler

Classes

class DiscordChannelHandler (bot_token: str, channel_id: int, level: int = 0, message_creator: MessageCreator = None)

A logging handler that sends messages to a Discord Channel from a Bot.

Args

bot_token : str
The authentication token of the Bot to send the message with.
channel_id : int
The ID of the Channel to send the message to.
level : int, optional
The level at which to log. Defaults to logging.NOTSET.
message_creator : MessageCreator, optional
An instance of MessageCreator or one of its subclasses that will be used to create the message to send from each log record. Defaults to one that sends messages in monospace.

Initializes the instance - basically setting the formatter to None and the filter list to empty.

Ancestors

Subclasses

Inherited members