Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ngoomie/pdqotd
A Perl script to make "question of the day" type posts to Discord via webhooks; mirror of Gitea repo
https://github.com/ngoomie/pdqotd
discord discord-bot discord-webhook perl perl5 sqlite
Last synced: 11 days ago
JSON representation
A Perl script to make "question of the day" type posts to Discord via webhooks; mirror of Gitea repo
- Host: GitHub
- URL: https://github.com/ngoomie/pdqotd
- Owner: ngoomie
- License: mit
- Created: 2023-03-25T00:11:16.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-05-15T23:55:41.000Z (over 1 year ago)
- Last Synced: 2024-11-18T18:02:38.530Z (2 months ago)
- Topics: discord, discord-bot, discord-webhook, perl, perl5, sqlite
- Language: Perl
- Homepage: https://git.hyperboreal.zone/nu/PDQoTD
- Size: 28.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Perl QoTD bot for Discord
Pulls random questions from a database and posts them using Discord webhooks.
![Example screenshot](example.png)
## Misc info
Requires `DBI` and `WebService::Discord::Webhook`. Find the `$url` var and change it to have your webhook URL. Run periodically using a cron script or similar. Has been tested on the following operating systems:
- Fedora (36, 37)
- Rocky Linux (9)Please open an issue if you've successfully run it on other operating systems and they'll be added.
## Database info
Create a database from the included 'questions.sql' file.- **id**: numerical question ID, autoincrements, don't touch this
- **question**: actual question text
- **source**: intended to be used for the name of whoever submitted the question, but can be easily altered to display e.g. the website a question was fetched from
- **used**: indicates whether a question has been used or not, indended to be either '0' for unused or '1' for used but can be other numbers if you need (i.e. '2' which you assign to questions you want to use but not right now, and you have another tool that will switch them over to '0' at a specified time)
- **when**: Unix timestamp indicating when the question was used, just for referenceBy default expects a database named `questions.sqlite`. Has only been tested with SQLite but should theoretically work with other database formats that DBI supports?