Discord birthday reminder bot.
Find a file
Noi 021def4f88 Fix roles not updating
Accidentally rewrote a handful of things while I was at it. The changes are staying.

After a long search, I found that this issue only shows itself if the bot is in several servers, encountering a valid configuration while it has yet to look at more servers (that is, a situation my debug bot is not in). The loop had been quitting halfway through for reasons seemingly beyond any logic or comprehension.

I already had a hunch that the query I wrote earlier was needlessly complex, as one might expect considering it was written during a state of delirium. It was easy to simplify it. I hoped that would be it, but no change occurred. On the contrary, some checks I slipped in there in the meantime were *passing*.

Further and further investigation finally revealed that the exception handler for background services doesn't actually do what it's expected to do. It's been silently dropping the exceptions that EF had been throwing this whole time, telling me quite plainly what the problem was and why it was quitting at a seemingly random spot.

The fix: Turns out the query evaluates during the foreach loop, which conflicts with wanting to do additional queries within it. Throwing a ToList() somewhere in it seems to have solved it.

These last few hours were quite the adventure...
My head hurts. Now I'm off to take a look at the exception handler.
2022-03-21 23:52:36 -07:00
ApplicationCommands Switch announce message setting to EF 2022-03-20 14:10:43 -07:00
BackgroundServices Fix roles not updating 2022-03-21 23:52:36 -07:00
Data Update services to use EF queries 2022-03-21 12:12:18 -07:00
Properties/PublishProfiles Edit project properties, add global usings 2021-11-21 12:55:49 -08:00
TextCommands Suppress obsolete warnings in deprecated code 2022-03-20 18:12:26 -07:00
.editorconfig Add config for new code style 2021-10-13 20:40:06 -07:00
.gitignore First commit for C# rewrite 2020-04-02 11:38:26 -07:00
BirthdayBot.csproj Add migrations 2022-03-19 14:51:41 -07:00
BirthdayBot.sln First commit for C# rewrite 2020-04-02 11:38:26 -07:00
Common.cs Didn't I remove this? 2022-02-07 21:21:10 -08:00
Configuration.cs Edit obsolete tags, remove soon-to-be-unneeded extension methods 2022-03-19 14:53:53 -07:00
License.txt Make corresponding changes from VB-based project 2020-05-19 19:15:54 -07:00
Program.cs Remove incorrect use of migrations 2022-03-19 18:07:30 -07:00
Readme.md Update Readme 2021-12-06 20:15:35 -08:00
ShardInstance.cs Suppress obsolete warnings in deprecated code 2022-03-20 18:12:26 -07:00
ShardManager.cs Begin switch to Interaction Framework 2022-02-23 15:18:48 -08:00

Birthday Bot

Recognize birthdays in your Discord community!

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.

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: bb.config role (role name) At this point, you may also wish to do the following optional steps:
  • Set the birthday announcement channel: bb.config channel (channel)
  • Set a default time zone: bb.config zone (time zone)
    • Use the command bb.help-tzdata for information on how to specify time zones.
  • Customize the announcement message: See bb.help-message for more information.

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, and 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 existing 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