2020-04-23 03:28:51 +00:00
|
|
|
# HypeBot
|
|
|
|
A Discord bot for managing events. Uses [Serenity](https://github.com/serenity-rs/serenity) for the bot framework
|
2020-05-20 00:18:13 +00:00
|
|
|
and [Diesel](http://diesel.rs/) as an ORM.
|
|
|
|
|
|
|
|
## Usage
|
|
|
|
Creating an event can be done using the `create` command.
|
|
|
|
```
|
|
|
|
~create "Test Event" "5:35PM 2020-05-17" "A very cool test event!" "Cool Place"
|
|
|
|
```
|
|
|
|
|
|
|
|
This creates a draft event that the user can then review:
|
|
|
|
|
2020-05-20 00:24:52 +00:00
|
|
|
![create event example](https://i.imgur.com/9jTko9W.png)
|
2020-05-20 00:18:13 +00:00
|
|
|
|
2020-05-20 00:26:27 +00:00
|
|
|
A user can then use the `confirm` command to create the event and publish it:
|
2020-05-20 00:18:13 +00:00
|
|
|
|
2020-05-20 00:24:52 +00:00
|
|
|
![announcement](https://i.imgur.com/AeTE1v2.png)
|
2020-05-20 00:18:13 +00:00
|
|
|
|
|
|
|
Users who react with ✅ will then be sent reminders about the event as private message.
|
2020-04-23 03:28:51 +00:00
|
|
|
|
|
|
|
## Running
|
2020-04-23 03:30:52 +00:00
|
|
|
`./hype_bot config.toml`
|
2020-04-23 03:28:51 +00:00
|
|
|
|
2020-05-20 00:18:13 +00:00
|
|
|
## Config
|
2020-04-23 03:28:51 +00:00
|
|
|
```toml
|
|
|
|
# Database URL
|
|
|
|
db_url = "mysql://[user]:[password]@localhost/hypebot_db"
|
|
|
|
# Default image to show on the thumbnail
|
|
|
|
default_thumbnail_link = "https://i.imgur.com/wPdnvoE.png"
|
|
|
|
# Discord bot key
|
|
|
|
discord_key = ""
|
|
|
|
# Bot command prefix
|
|
|
|
prefix = "~"
|
|
|
|
# Channel ID to post to
|
|
|
|
event_channel = 0
|
2020-05-20 00:36:59 +00:00
|
|
|
# List of roles that can use the bot
|
|
|
|
event_roles = [0]
|
2020-07-10 14:29:54 +00:00
|
|
|
# List of roles to ping when a new event is posted
|
|
|
|
ping_roles = [0]
|
2020-05-20 00:36:59 +00:00
|
|
|
# Timezone to display events, supported timezones can be found at https://docs.rs/chrono-tz/0.5.1/chrono_tz/#modules
|
2020-04-24 00:45:02 +00:00
|
|
|
event_timezone = "America/New_York"
|
2020-05-23 03:57:11 +00:00
|
|
|
# Path to place logs in
|
|
|
|
log_path = "log/"
|
2020-08-08 23:09:07 +00:00
|
|
|
|
|
|
|
# Configurable Reminders
|
|
|
|
[[reminders]]
|
|
|
|
# Message to send, "{EVENT_NAME}" gets replaced with the event's name
|
|
|
|
msg = "{EVENT_NAME} is starting now!"
|
|
|
|
# number of minutes before an event to send the reminder
|
|
|
|
reminder_time = 0
|
|
|
|
|
|
|
|
[[reminders]]
|
|
|
|
msg = "{EVENT_NAME} is starting in 1 minute!"
|
|
|
|
reminder_time = 1
|
|
|
|
|
|
|
|
[[reminders]]
|
|
|
|
msg = "{EVENT_NAME} is starting in 5 minutes!"
|
|
|
|
reminder_time = 5
|
2020-04-23 03:28:51 +00:00
|
|
|
```
|