christmas-countdown / bot Goto Github PK
View Code? Open in Web Editor NEWThe original Christmas countdown bot for Discord.
Home Page: https://christmascountdown.live/discord
License: GNU General Public License v3.0
The original Christmas countdown bot for Discord.
Home Page: https://christmascountdown.live/discord
License: GNU General Public License v3.0
https://github.com/christmas-countdown/bot/blob/main/src/listeners/messageCreate.js
Replace these commands with stdin commands because the message intent is now privileged.
Similar to an older idea for a countdown widget (a message that is updated instead of a new message every day), add an option to update the name of a voice channel with the number of sleeps left:
This could be done with a command that creates a new voice channel with the default (localised) format and setting the guild's voiceChannelId
. It could also support custom formats by replacing the first number in the channel name with the new number, instead of overwriting the name entirely.
On Christmas Eve, replace the format with something like ๐
7 hours left
, and ๐ Merry Christmas!
on Christmas Day.
Original idea: https://ptb.discord.com/channels/451745464480432129/516662786760245258/1011050283482234981
...until the bot is restarted to re-send the message.
Create the countdown webhook when the bot is added:
https://discord.com/developers/docs/topics/oauth2#webhooks
This would require a functional callback (it could be serverless but needs to connect to the database).
and tell the user how to fix it
Make the countdown images loop more smoothly by making the snow start and end in the same position.
This is less about handling excessive demand (the existing setup already does that incredibly well, not to toot my own horn) and more just to improve uptime and also potentially response times from the bot.
Essentially, host the different shards of the bot on different servers on different physical nodes rather than how it's currently setup of all the shards on a single container on a single physical server.
Current ideas for this are mainly assuming most of the bot will still be in the same/nearby datacentres however shards will be on nodes all over the world. This is so if a physical server has issues for whatever reason, most shards won't be affected and will go online to handle the increased number of requests.
This idea likely won't be acted on anytime soon, if at all. But I'd like to document this so I know it's something that can be worked on.
When the bot is added to a server, check its preferredLocale
and change the settings if the bot has the locale loaded.
Better avoid rate-limiting and permissions issues by creating a webhook in the countdown channel, storing the URL and sending a webhook for the countdown message.
Or remove premium entirely?
25/12/22 18:27:33 notice (manager) ๐ฃ An error was not caught
25/12/22 18:27:33 error (manager) โผ๏ธ TypeError: Cannot read properties of undefined (reading 'city')
at Object.module.exports.track (/home/container/src/santa-tracker.js:41:60)
at Timeout._onTimeout (/home/container/src/index.js:75:28)
at listOnTimeout (node:internal/timers:559:17)
at processTimers (node:internal/timers:502:7)
It doesn't show the ending embed, there is an error before it is sent.
The general consensus (from my admittedly little knowledge on the subject) seems to be that Discord's main API gateway will probably be hosted in the US. With that in mind, maybe more of the shards could be hosted there?
This will probably need some testing at some point, probably in line with #71 but it'd be fun to explore as it could potentially improve the response time of the bot.
food for thought
because 95% of suggestions are not related to Christmas.
The theme (especially font sizes) could be better.
Zoom out more.
https://en.wikipedia.org/wiki/Observance_of_Christmas_by_country
Generate 366 (leap years) images with a big number in the middle and a random Winter/Chrismtas background image
Maybe animated with snow:
Separate the gateway so restarts take seconds instead of several minutes.
Doesn't need to be serverless, could use something like https://discordeno.js.org
Use cron
If the message doesn't exist anymore, remove the message from the store and send a new one.
Add localised names and descriptions for commands and options.
https://christmascountdown.live/discord/add could have a form that asks
Then
Also, have a similar wizard for /setup
?
Replace Countly with https://statcord.com/ or a custom solution.
I want to use https://grafana.com/ but https://prometheus.io/ isn't intended for long-term storage and analytics. Could use https://www.timescale.com/promscale.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.