Giter Site home page Giter Site logo

christmas-countdown / bot Goto Github PK

View Code? Open in Web Editor NEW
17.0 4.0 9.0 2.96 MB

The original Christmas countdown bot for Discord.

Home Page: https://christmascountdown.live/discord

License: GNU General Public License v3.0

JavaScript 100.00%
discord christmas countdown bot christmas-countdown

bot's Introduction

Christmas Countdown Bot

The original Christmas Countdown bot for Discord.

status server count Discord support server

Find out more at christmascountdown.live/discord.

Information ยท Add to Discord ยท Support

Weblate translations

Environment

BL_TOPGG=
BL_BFD=
BL_SPACE=
BL_DBGG=
BL_DADEV=
BL_DBL=
BL_DS=
BL_VOID=
DISCORD_TOKEN=
DATABASE_URL=
PORT=
OWNER=
STATCORD=
SUGGESTIONS_WEBHOOK=

bot's People

Contributors

atalanttore avatar comradekingu avatar dankvardt avatar dasjott avatar davidcralph avatar dependabot[bot] avatar depfu[bot] avatar depscian avatar derjoshua avatar diebug6 avatar duckmasteral avatar eartharoid avatar eclipxe13 avatar emalondra avatar fernecoder avatar fjuro avatar fredhappyface avatar ifusionfr avatar indimops avatar jacktam9999 avatar jipaix avatar justman100 avatar kdhkr avatar laarsonw avatar mods-hd avatar sal0max avatar stakosh avatar tearenn avatar vistaus avatar weblate avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

bot's Issues

Explore the idea of more US-hosted infrastructure

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

Santa Tracker ending bug

 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.

Use webhooks

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.

Web-based initial setup

https://christmascountdown.live/discord/add could have a form that asks

  • which countdowns and features to enable
  • server timezone (international or local)
  • user timezone (suggest from browser)
  • #85

Then

  1. Store answers in local storage? or submit the form to the bot
  2. #79
  3. After callback, apply settings.

Also, have a similar wizard for /setup?

Improve Secret Santa Error Messages

The error messages for some Secret Santa errors are really vague or just completely useless. Add more detail to them, something like this:
image

Countdown images

v4: Interactions rewrite

Rewrite the bot (again), most likely ditching akairo, to use interactions (slash commands). Could go serverless (Firebase), which would require #55.

Load balance shards across different physical servers

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.

Premium users, not premium guilds

  • Ko-fi assigns cool people role
  • Bot checks if user has role (has role = is premium)
  • If the owner of a server is premium, the server gets premium features.

Or remove premium entirely?

Add a voice channel countdown

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:

image

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

Use Guild#preferredLocale

When the bot is added to a server, check its preferredLocale and change the settings if the bot has the locale loaded.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.