Transfer logs acquired by logging module to discord with webhook!
Project description
discord_logging
discord_logging is a logging extension module.
By using this module, logs can be sent by webhook.
installing
Install and update using pip:
pip install discord_logging
A simple example.
import discord
import logging
import discord_logging
logger = logging.getLogger()
WEBHOOK_URL = "Your webhook url"
handler = discord_logging.Discord_Handler(WEBHOOK_URL)
logger.addHandler(handler)
client = discord.Client()
@client.event
async def on_ready():
print('login!(\'◇\')ゞ')
@client.event
async def on_message(message):
if message.author.bot:
return
if message.content == '/hello':
await message.channel.send('hello')
client.run('THi5IsDuMMyaCCesSTOK3nQ4.Cl2FMQ.ThIsi5DUMMyAcc3s5ToKen7kKWs')
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file discord_logging_fork1-1.0.tar.gz.
File metadata
- Download URL: discord_logging_fork1-1.0.tar.gz
- Upload date:
- Size: 2.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.7.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b319220800bc347b2944cd8beb0af6f30a8648d55c5fce612561daf1c78b528e
|
|
| MD5 |
c886f2d1168a2dc73efbe994cd89cf63
|
|
| BLAKE2b-256 |
432f42bc63bf16e346bde03a4cc19c70a8e58f5835f53277d29a6579232cacfd
|