Merge pull request #42 from NoiTheCat/docs-rewrite

Rewrite Readme; create documentation website
This commit is contained in:
Noi 2023-03-09 12:35:35 -08:00 committed by GitHub
commit c0b857d46e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 192 additions and 45 deletions

View file

@ -36,4 +36,8 @@
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL.Design" Version="1.1.0" />
</ItemGroup>
<PropertyGroup>
<DefaultItemExcludes>Docs/**;$(DefaultItemExcludes)</DefaultItemExcludes>
</PropertyGroup>
</Project>

9
Docs/.gitignore vendored Normal file
View file

@ -0,0 +1,9 @@
_site
.sass-cache
.jekyll-cache
.jekyll-metadata
vendor
# Sourced externally; cautiously excluding from repo
# Get it from https://www.flaticon.com/free-icon/birthday-cake_168532
birthday-cake.png

4
Docs/Gemfile Normal file
View file

@ -0,0 +1,4 @@
source "https://rubygems.org"
gem "jekyll", "~> 4.3.2"
gem "jekyll-remote-theme"
gem "jekyll-seo-tag"

82
Docs/Gemfile.lock Normal file
View file

@ -0,0 +1,82 @@
GEM
remote: https://rubygems.org/
specs:
addressable (2.8.1)
public_suffix (>= 2.0.2, < 6.0)
colorator (1.1.0)
concurrent-ruby (1.1.10)
em-websocket (0.5.3)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0)
eventmachine (1.2.7)
ffi (1.15.5)
forwardable-extended (2.6.0)
google-protobuf (3.21.12-x86_64-linux)
http_parser.rb (0.8.0)
i18n (1.12.0)
concurrent-ruby (~> 1.0)
jekyll (4.3.2)
addressable (~> 2.4)
colorator (~> 1.0)
em-websocket (~> 0.5)
i18n (~> 1.0)
jekyll-sass-converter (>= 2.0, < 4.0)
jekyll-watch (~> 2.0)
kramdown (~> 2.3, >= 2.3.1)
kramdown-parser-gfm (~> 1.0)
liquid (~> 4.0)
mercenary (>= 0.3.6, < 0.5)
pathutil (~> 0.9)
rouge (>= 3.0, < 5.0)
safe_yaml (~> 1.0)
terminal-table (>= 1.8, < 4.0)
webrick (~> 1.7)
jekyll-remote-theme (0.4.3)
addressable (~> 2.0)
jekyll (>= 3.5, < 5.0)
jekyll-sass-converter (>= 1.0, <= 3.0.0, != 2.0.0)
rubyzip (>= 1.3.0, < 3.0)
jekyll-sass-converter (3.0.0)
sass-embedded (~> 1.54)
jekyll-seo-tag (2.8.0)
jekyll (>= 3.8, < 5.0)
jekyll-watch (2.2.1)
listen (~> 3.0)
kramdown (2.4.0)
rexml
kramdown-parser-gfm (1.1.0)
kramdown (~> 2.0)
liquid (4.0.4)
listen (3.8.0)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
mercenary (0.4.0)
pathutil (0.16.2)
forwardable-extended (~> 2.6)
public_suffix (5.0.1)
rake (13.0.6)
rb-fsevent (0.11.2)
rb-inotify (0.10.1)
ffi (~> 1.0)
rexml (3.2.5)
rouge (4.0.1)
rubyzip (2.3.2)
safe_yaml (1.0.5)
sass-embedded (1.57.1)
google-protobuf (~> 3.21)
rake (>= 10.0.0)
terminal-table (3.0.2)
unicode-display_width (>= 1.1.1, < 3)
unicode-display_width (2.4.2)
webrick (1.7.0)
PLATFORMS
x86_64-linux
DEPENDENCIES
jekyll (~> 4.3.2)
jekyll-remote-theme
jekyll-seo-tag
BUNDLED WITH
2.4.5

25
Docs/_config.yml Normal file
View file

@ -0,0 +1,25 @@
# https://github.com/BDHU/minimalist
title: Birthday Bot
description: An automated way to recognize birthdays in your community!
logo: /birthday-cake.png
show_downloads: false
remote_theme: BDHU/minimalist
color-scheme: dark
plugins:
- jekyll-remote-theme
# https://icon-sets.iconify.design/
sidebar:
- name: Invite the bot
icon: <svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><path fill="currentColor" d="M12 14q.425 0 .713-.288Q13 13.425 13 13v-2h2q.425 0 .713-.288Q16 10.425 16 10t-.287-.713Q15.425 9 15 9h-2V7q0-.425-.287-.713Q12.425 6 12 6t-.712.287Q11 6.575 11 7v2H9q-.425 0-.712.287Q8 9.575 8 10t.288.712Q8.575 11 9 11h2v2q0 .425.288.712q.287.288.712.288ZM2 19.575V4q0-.825.588-1.413Q3.175 2 4 2h16q.825 0 1.413.587Q22 3.175 22 4v12q0 .825-.587 1.413Q20.825 18 20 18H6l-2.3 2.3q-.475.475-1.088.212Q2 20.25 2 19.575Zm2-2.4L5.175 16H20V4H4ZM4 4v13.175Z"/></svg>
link: https://discord.com/api/oauth2/authorize?client_id=470673087671566366&permissions=268451840&scope=bot%20applications.commands
- name: Official server
icon: <svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><path fill="currentColor" d="M19.27 5.33C17.94 4.71 16.5 4.26 15 4a.09.09 0 0 0-.07.03c-.18.33-.39.76-.53 1.09a16.09 16.09 0 0 0-4.8 0c-.14-.34-.35-.76-.54-1.09c-.01-.02-.04-.03-.07-.03c-1.5.26-2.93.71-4.27 1.33c-.01 0-.02.01-.03.02c-2.72 4.07-3.47 8.03-3.1 11.95c0 .02.01.04.03.05c1.8 1.32 3.53 2.12 5.24 2.65c.03.01.06 0 .07-.02c.4-.55.76-1.13 1.07-1.74c.02-.04 0-.08-.04-.09c-.57-.22-1.11-.48-1.64-.78c-.04-.02-.04-.08-.01-.11c.11-.08.22-.17.33-.25c.02-.02.05-.02.07-.01c3.44 1.57 7.15 1.57 10.55 0c.02-.01.05-.01.07.01c.11.09.22.17.33.26c.04.03.04.09-.01.11c-.52.31-1.07.56-1.64.78c-.04.01-.05.06-.04.09c.32.61.68 1.19 1.07 1.74c.03.01.06.02.09.01c1.72-.53 3.45-1.33 5.25-2.65c.02-.01.03-.03.03-.05c.44-4.53-.73-8.46-3.1-11.95c-.01-.01-.02-.02-.04-.02zM8.52 14.91c-1.03 0-1.89-.95-1.89-2.12s.84-2.12 1.89-2.12c1.06 0 1.9.96 1.89 2.12c0 1.17-.84 2.12-1.89 2.12zm6.97 0c-1.03 0-1.89-.95-1.89-2.12s.84-2.12 1.89-2.12c1.06 0 1.9.96 1.89 2.12c0 1.17-.83 2.12-1.89 2.12z"/></svg>
link: https://discord.gg/JCRyFk7
- name: GitHub
icon: <svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><path fill="currentColor" d="M14.435 12.973c.269 0 .492.133.686.396c.192.265.294.588.294.975c0 .385-.102.711-.294.973c-.193.265-.417.396-.686.396c-.278 0-.522-.131-.715-.396c-.192-.262-.294-.588-.294-.973c0-.387.102-.71.294-.975c.192-.264.436-.396.715-.396m3.44-3.559c.746.811 1.125 1.795 1.125 2.953c0 .748-.086 1.423-.259 2.023c-.175.597-.394 1.084-.654 1.459a4.268 4.268 0 0 1-.974.989a4.94 4.94 0 0 1-1.065.623a5.465 5.465 0 0 1-1.111.306a9 9 0 0 1-.943.123l-.685.014l-.547.015a17.567 17.567 0 0 1-1.524 0l-.547-.015l-.685-.014a8.966 8.966 0 0 1-.943-.123a5.28 5.28 0 0 1-1.111-.306a4.888 4.888 0 0 1-1.064-.623a4.253 4.253 0 0 1-.975-.989c-.261-.375-.479-.862-.654-1.459c-.173-.6-.259-1.275-.259-2.023c0-1.158.379-2.143 1.125-2.953c-.082-.041-.085-.447-.008-1.217a7.071 7.071 0 0 1 .495-2.132c.934.099 2.09.629 3.471 1.581c.466-.119 1.101-.183 1.917-.183c.852 0 1.491.064 1.918.184c.629-.425 1.23-.771 1.805-1.034c.584-.261 1.005-.416 1.269-.457l.396-.09c.27.649.434 1.36.496 2.132c.076.769.073 1.175-.009 1.216m-5.845 7.82c1.688 0 2.954-.202 3.821-.607c.855-.404 1.292-1.238 1.292-2.496c0-.73-.273-1.34-.822-1.828a1.845 1.845 0 0 0-.989-.486c-.375-.061-.949-.061-1.72 0c-.769.062-1.298.09-1.582.09c-.385 0-.8-.018-1.319-.059c-.52-.04-.928-.065-1.223-.078a3.727 3.727 0 0 0-.958.108a1.913 1.913 0 0 0-.853.425c-.521.469-.79 1.077-.79 1.828c0 1.258.426 2.092 1.28 2.496c.85.405 2.113.607 3.802.607h.061m-2.434-4.261c.268 0 .492.133.685.396c.192.265.294.588.294.975c0 .385-.102.711-.294.973c-.192.265-.417.396-.685.396c-.279 0-.522-.131-.716-.396c-.192-.262-.294-.588-.294-.973c0-.387.102-.71.294-.975c.193-.264.436-.396.716-.396"/></svg>
link: https://github.com/NoiTheCat/BirthdayBot
- name: Support me on Ko-fi
icon: <svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><path fill="currentColor" d="M23.881 8.948c-.773-4.085-4.859-4.593-4.859-4.593H.723c-.604 0-.679.798-.679.798s-.082 7.324-.022 11.822c.164 2.424 2.586 2.672 2.586 2.672s8.267-.023 11.966-.049c2.438-.426 2.683-2.566 2.658-3.734c4.352.24 7.422-2.831 6.649-6.916zm-11.062 3.511c-1.246 1.453-4.011 3.976-4.011 3.976s-.121.119-.31.023c-.076-.057-.108-.09-.108-.09c-.443-.441-3.368-3.049-4.034-3.954c-.709-.965-1.041-2.7-.091-3.71c.951-1.01 3.005-1.086 4.363.407c0 0 1.565-1.782 3.468-.963c1.904.82 1.832 3.011.723 4.311zm6.173.478c-.928.116-1.682.028-1.682.028V7.284h1.77s1.971.551 1.971 2.638c0 1.913-.985 2.667-2.059 3.015z"/></svg>
link: https://ko-fi.com/noithecat

38
Docs/index.md Normal file
View file

@ -0,0 +1,38 @@
---
layout: default
title: Documentation
---
# Birthday Bot
**An automated way to recognize birthdays in your community!**
Birthday Bot is a utility for your community which enables your users to share their birthdays, check birthdays of others, and mark and announce birthdays as they happen. Server moderators can additionally set up a default time zone with users having the option to set their own, ensuring all birthdays are recognized precisely on time.
### Getting started
Invite the bot via the link on the sidebar. Please note that several permissions are requested during the invite process which are required for the bot to function properly.
Once added, a small amount of initial set-up before it's ready for use:
* Create a dedicated birthday role to be used only by the bot. Ensure the new role is placed beneath the bot's own role.
* Instruct the bot to use the role: `/config role set-birthday-role`
> <p style="font-style: normal"><svg xmlns="http://www.w3.org/2000/svg" style="vertical-align: -0.125em;" width="1em" height="1em" viewBox="0 0 16 16"><g fill="currentColor"><path d="M4.54.146A.5.5 0 0 1 4.893 0h6.214a.5.5 0 0 1 .353.146l4.394 4.394a.5.5 0 0 1 .146.353v6.214a.5.5 0 0 1-.146.353l-4.394 4.394a.5.5 0 0 1-.353.146H4.893a.5.5 0 0 1-.353-.146L.146 11.46A.5.5 0 0 1 0 11.107V4.893a.5.5 0 0 1 .146-.353L4.54.146zM5.1 1L1 5.1v5.8L5.1 15h5.8l4.1-4.1V5.1L10.9 1H5.1z"/><path d="M7.002 11a1 1 0 1 1 2 0a1 1 0 0 1-2 0zM7.1 4.995a.905.905 0 1 1 1.8 0l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 4.995z"/></g></svg> <strong>Do not use an existing role!</strong> This bot will take full and exclusive control over it. Users that have the role but are not having a birthday
*will* be removed from it!</p>
Optional, but recommended:
* Customize the announcement message: See `/config announce help` for more information.
* Set the birthday announcement channel: `/config announce set-channel`
* Set a default time zone: `/config set-timezone`
### Supporting the bot
Birthday Bot is provided for free, period. No paywalled features, subscriptions, or monetization insentices. This is an independent hobby project done in my spare time, and all costs associated with it come out of my pocket. My only interest is to provide something that I hope others find as useful as I do.
That said, this bot has proven to be far more popular than I ever anticipated, and keeping things running has occasionally strained me both financially and time-wise. If you'd like, please consider pitching in a bit to cover my recurring costs by checking out my Ko-fi page on the sidebar.
### Privacy and Security
This bot collects and stores only information necessary for its operation, then associated to user, server, and role IDs. As little information is stored as possible and access to the database is strongly restricted through proper security practices.
Birthday information is not shared between servers *by design*, for those preferring to be selective about where they want their information known. Users must set their birthday settings in each individual server.
Any questions and concerns regarding data privacy, security, and retention may be sent to the bot author via the support server or by opening an issue on GitHub.
### Image credit
<a href="https://www.flaticon.com/free-icons/cake" title="cake icons">Cake icons created by Freepik - Flaticon</a>

View file

@ -1,52 +1,37 @@
# Birthday Bot
An automated way to recognize birthdays in your community!
* Info: https://discord.bots.gg/bots/470673087671566366
[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/J3J65TW2E)
## Recognize birthdays in your Discord community!
#### Documentation, help, resources
* [Main website, user documentation](https://noithecat.dev/bots/BirthdayBot)
* [Official server](https://discord.gg/JCRyFk7)
Birthday Bot is a simple, single-purpose bot. It will set a role on your users for the duration of their birthdays and, if desired, can
announce a message in a channel of your choosing. Server owners can further specify a default time zone, with individual users also setting
their own to ensure everyone's birthdays are recognized precisely on time.
#### Running your own instance
You need:
* .NET 6 (https://dotnet.microsoft.com/en-us/)
* PostgreSQL (https://www.postgresql.org/)
* EF Core tools (https://learn.microsoft.com/en-us/ef/core/get-started/overview/install#get-the-entity-framework-core-tools)
* A Discord bot token (https://discord.com/developers/applications)
#### Getting started
This bot requires a small amount of initial set-up before it's ready for use. To quickly get started, ensure that you:
* Create a dedicated birthday role to be used only by the bot. Ensure the new role is placed beneath the bot's own role.
* **Do not use an existing role!** This bot assumes exclusive control over it. Users that have the role but are not having a birthday
*will* be removed from it!
* Instruct the bot to use the role: `/config role set-birthday-role`
At this point, you may also wish to do the following optional steps:
* Set the birthday announcement channel: `/config announce set-channel`
* Set a default time zone: `/config set-timezone`
* Customize the announcement message: See `/config announce help` for more information.
Get your bot token and set up your database user and schema, then create a JSON file containing the following:
```jsonc
{
"BotToken": "your bot token here",
"SqlHost": "localhost", // optional
"SqlDatabase": "birthdaybot", // optional
"SqlUser": "birthdaybot", // required
"SqlPassword": "birthdaybot" // required; no other authentication methods are currently supported
}
```
#### Time zone support
You may specify a time zone in order to have your birthday recognized with respect to your local time. This bot only accepts zone names
from the IANA Time Zone Database (a.k.a. Olson Database).
* To find your zone: https://xske.github.io/tz/
* Interactive map: https://kevinnovak.github.io/Time-Zone-Picker/
* Complete list: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
Then run the following commands:
```sh
$ dotnet restore
$ dotnet ef database update -- -c path/to/config.json
```
#### Support the bot
Birthday Bot is and shall remain fully free to use. I have no plans to hide any new or existing features behind pay-only, premium features.
This is an independent hobby project and all costs associated with it come out of my pocket.
This bot has had a far greater response than I've ever expected, and at this point I find it difficult to pay for the server it runs on as
its resource needs grow. I would greatly appreciate if you consider pitching in a little bit to cover my recurring costs by checking out my
Ko-fi page: https://ko-fi.com/noithecat.
#### Support, Privacy and Security
The support server for my bots can be accessed via the given link: https://discord.gg/JCRyFk7. Further information in setting up the bot
can be found within it, as well as a small group of volunteers who are willing to answer questions.
This bot collects and stores only information necessary for its operation, including user, server, and role IDs. This data is not stored
indefinitely, but is removed after an extended period of lack of use. If an individual member of a server is not seen after 360 days, their
data is purged. If the bot has been removed from a server, all data (including of its associated users) is purged after 180 days.
Birthdays are not shared between servers that this same bot may be in. This is *by design*, for those preferring to share their birthdays
with only certain communities instead of automatically sharing it to all of them. Users must enter their birthday information onto every
server they share with the bot for the servers they wish for it to be known in.
Any questions and concerns regarding data and security may be sent to the bot author via the support server or GitHub.
#### Image credit
The icon used by this bot is from Flaticon, found at: https://www.flaticon.com/free-icon/birthday-cake_168532
And finally, to run the bot:
```
$ dotnet run -c Release -- -c path/to/config.json
```