Noi
021def4f88
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. |
||
---|---|---|
ApplicationCommands | ||
BackgroundServices | ||
Data | ||
Properties/PublishProfiles | ||
TextCommands | ||
.editorconfig | ||
.gitignore | ||
BirthdayBot.csproj | ||
BirthdayBot.sln | ||
Common.cs | ||
Configuration.cs | ||
License.txt | ||
Program.cs | ||
Readme.md | ||
ShardInstance.cs | ||
ShardManager.cs |
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.
- Use the command
- 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