petderek / discord-bot-thing

learning how to discord bot

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

discord-bot-thing

About

This is a discord robit, mainly to learn how discord webhooks work.

For now, we're keeping it simple. It uses cron and a python3 script to post to the discord api

Its config file is expected to be in /etc/discordbot/config and it looks for messages in /etc/discordbot/wod.${day-of-week}.

Config files use the python configparser library. The config options are as follows:

# this is the webhook url you get from discord
webhook=https://example.com/blah

Dependencies

Your system needs to be running python3 and it needs dhooks installed via pip:

pip install dhooks

How to run

After creating the config and message files, you can run this like:

python bot.py

However, the intended use is to be invoked as a cron job.

About

learning how to discord bot


Languages

Language:Python 100.0%