Skip to content

Instantly share code, notes, and snippets.

@tazz4843
Last active April 8, 2021 04:52
Show Gist options
  • Save tazz4843/01a7b87c1dc924d810b7a95a358a8048 to your computer and use it in GitHub Desktop.
Save tazz4843/01a7b87c1dc924d810b7a95a358a8048 to your computer and use it in GitHub Desktop.
COVID-19 Bot Docs

Discord Bots

COVID-19 Discord Bot

A bot to give live stats on the COVID-19 (aka COVID 19, COVID19 and/or coronavirus) pandemic: simple as that: but that's not the only feature it has! This bot has:

  • A auto-updater to send updates on a country every specified number of minutes/hours/days/weeks (c!help autoupdate for details)
  • Global, country, US state, and province stats (c!covid world for global, c!covid country <country> for stats on <country>, c!covid province <province> for stats on <province> in <country>, and c!covid state <state> for stats on <state>.)
  • Maps! See a global, high-quality map for a lot of stuff, like total cases! See c!maps for details.
  • Vaccine stats! Get details on the latest vaccine canadiates without leaving Discord! See c!vaccine for details.
  • Graphs! Get a nice dark-mode graph for anything that the c!covid command supports.
  • And much more!

Features Coming Soon!

Check out our GitKraken board to see what we're working on!

https://app.gitkraken.com/glo/board/X-SmC9S39AAROLhX

Invite the Bot

https://covid19.imaskeleton.me/invite

Support Server:

Discord Server

List of Commands

  • c!autoupdate: Root command for the autoupdater. Subcommands are listed below.

    • c!autoupdate country <delay> <country>: Updates for a country every specified delay.

      <country> should be the country's ISO2 code. You can find a list here: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2

      Example: c!autoupdate country 1d FI would send a update for Finland every 1 day.

    • c!autoupdate disable <id>: Disables a updater with the specified ID. The ID can be a numeric argument (as found in c!autoupdate list) or all to disable all updaters in that channel.

      Example: c!autoupdate disable 1 would disable the updater with ID 1.

      Example: c!autoupdate disable all would disable all updaters in this channel.

    • c!autoupdate state <delay> <state>: Updates for a USA state every specified delay.

      Example: c!autoupdate country 1d pennsylvania would send a update for Pennsylvania, USA every 1 day.

    • c!autoupdate custom <delay> <custom>: Enable a custom updater, a more powerful type of updater that lets you specify your own message with placeholders. There are currently no docs on these.

    • c!autoupdate world <delay>: Updates for the world every specified delay.

      Example: c!autoupdate world 12h would send a update for the world every 12 hours.

    • c!autoupdate province <delay> <province>: Updates for a province every specified delay.

      <province> should be the province name, exactly as can be found on official documents.

      Example: c!autoupdate province 10m Ontario would send a update for Ontario, Canada every 10 minutes.

    • c!autoupdate graphs: Root command for graph updaters. Any of the graph updaters require voting to unlock.

      Graph updaters are limited to a minimum duration of 23 hours. This is exactly as long as they live in cache for, so you are not missing out on anything with this restriction.

      All graphs are cached for exactly 23 hours. That is, if you request the same graph twice within 23 hours, you will get the same one that was created previously, even if the data has been updated. The counter starts the moment the graph is created, and never resets to 0.

      • c!autoupdate graphs state <delay> <state> <logarithmic>: Updates with a graph for a US state. <logarithmic> defines whether the graph should be logarithmic. All other params are the same as for c!autoupdate state.

        Example: c!autoupdate graphs state 69h Wyoming False will send a graph every 69 hours, for Wyoming, that is not logarithmic.

      • c!autoupdate graphs province <delay> <state> <logarithmic>: Updates with a graph for a province. <logarithmic> defines whether the graph should be logarithmic. All other params are the same as for c!autoupdate province.

        Example: c!autoupdate graphs province 23h "British Columbia" True will send a graph every 23 hours, for British Columbia, Canada, that is logarithmic.

      • c!autoupdate graphs world <delay> <logarithmic>: Updates with a graph for the world. <logarithmic> defines whether the graph should be logarithmic. All other params are the same as for c!autoupdate world.

        Example: c!autoupdate graphs world 1mo True will send a graph every 1 month, for the world, that is logarithmic.

      • c!autoupdate graphs country <delay> <country> <logarithmic>: Updates with a graph for the world. <logarithmic> defines whether the graph should be logarithmic. All other params are the same as for c!autoupdate country.

        Example: c!autoupdate graphs country 7d UK False will send a graph every 7 days, for the United Kingdom, that is not logarithmic.

    • c!autoupdate force_update <id>: Forces a updater to run at the next iteration of the updater loop, no matter what.

      The updater loop runs once every minute, so this will always force a update within the next minute.

      Example: c!autoupdate force_update 273 would force the updater with ID 273 to update at the next iteration.

    • c!autoupdate update_at <id> <at>: Forces a updater to run at a specified time in UTC. The updater will not send any updates until this time.

      Example: c!autoupdate update_at 273 19:00 would force the updater with ID 273 to update at 19:00 UTC.

    • c!autoupdate list: Lists all active updaters in this channel.

    • c!autoupdate map <delay> <map_type>: Updates with a map. <map_type> is one of the types defined in c!maps types.

      This updater type requires voting to enable.

      Example: c!autoupdate map 12h total_cases would send a map showing total cases every 12 hours.

    • c!autoupdate continent <delay> <continent>: Updates for a continent every specified delay.

      Example: c!autoupdate continent 1d "North America" would send a update for North America every 1 day.

  • c!credits: See all the people who had a hand in making the bot.

  • c!invite: If you need help with the bot, or want to invite it to your server, run this command.

  • c!ping: Pong!

  • c!stats: Check out bot stats, like how many servers it's in!

  • c!vote: Vote for the bot and help it out, and get a reward in return!

  • c!covid: Arguably the most important command.

    • c!covid world <old_version=False>: Get COVID-19 stats for the world.

      <old_version> defines whether to use the old version of the stats embed. It does have less info, but doesn't send as many messages.

    • c!covid continent <continent>: Get COVID-19 stats for a continent. View all possible continent names in c!list continent.

      Example: c!covid continent North America will send stats on North America.

    • c!covid province <province>: Get COVID-19 stats for a province.

      Example: c!covid province Manitoba will send stats on Manitoba, Canada.

    • c!covid country <country_name> <old_version=True> Get COVID-19 stats for a country.

      <old_version> defines whether to use the old version of the stats embed.

      Example: c!covid country Japan will send stats on Japan, using the old version of the stats embed.

      Example: c!covid country Greece True will send stats on Greece, using the new version of the stats embed.

  • c!settings: Change per-server settings.

    • c!settings minigame <enabled> <log_channel> <infected_role> <cured_role> <dead_role>: The bot has a minigame. This setting is used to toggle it.

      Example: c!settings minigame True #minigame @Infected @Cured @Dead would enable the minigame, setting the log channel to #minigame, the infected role to @Infected, the cured role to @Cured, and the dead role to @Dead.

      Example: c!settings minigame False would disable the minigame, keeping all settings and player stats.

    • c!settings prefix <new_prefix>: Change the bot prefix. This will replace c! as a prefix. If you lose the prefix, you can mention the bot as a prefix.

    • c!settings language <language_code>: Change the language for your server. Currently the only supported languages are:

      • English (100% translated)
      • Finnish (suomi) (20% translated)

      If messages are not available in your language, the bot will use English as a fallback.

  • c!graphs: Fancy dark-mode graphs for any country!

    • c!graphs world <log>: Send a graph for the world. If the graph is found in cache, it will be used.

      Example: c!graphs world would ask you if you wanted a linear or logarithmic graph.

      Example: c!graphs world True would send a logarithmic graph for the world.

    • c!graphs country <name> <log>: Send a graph for a specified country. If the graph is found in cache, it will be used.

      Example: c!graphs country Brazil would ask you if you wanted a linear or logarithmic graph for Brazil.

      Example: c!graphs country France False would send a linear graph for France.

    • c!graphs province <name> <log>: Send a graph for a specified province. If the graph is found in cache, it will be used.

      Example: c!graphs province Saskatchewan would ask you if you wanted a linear or logarithmic graph for Saskatchewan, Canada.

      Example: c!graphs province Alberta True would send a logarithmic graph for Alberta, Canada.

    • c!graphs state <name> <log>: Send a graph for a specified US state. If the graph is found in cache, it will be used.

      Example: c!graphs state "North Dakota" would ask you if you wanted a linear or logarithmic graph for North Dakota.

      Example: c!graphs state "New York" False would send a linear graph for New York.

    • c!graphs continent: Will not send anything. Only exists to let users know graphs are not available for continents.

  • c!list: A handy list in case you're lost!

    • c!list states <page=1>: Get a list of US states. Specify the page number to go to if required.

    • c!list continents: Get a list of exact continent names.

    • c!list countries <first_letter> Get a list of countries starting with <first_letter> and their ISO2 codes.

  • c!maps: Fancy, high-quality maps from Our World In Data. These maps are updated once daily (usually!).

    • c!maps types: Show all map types that can be used when calling c!maps show <type>.

    • c!maps show <type> Show a specified map. <type> must be one of the types in c!maps types.

  • c!suggest <suggestion>: Suggest something new to be added to the bot!

  • c!shards: Check the status of every shard the bot is hosting.

  • c!top <type>: Get the top countries when it comes to something! Running this command with a invalid argument will show all possible sort types.

  • c!vaccine: Get COVID-19 vaccine stats. Invoking this command without subcommands will show a general overview.

    • c!vaccine list_all_candidates <page=1>: Show all COVID-19 vaccine candidates. Specify a page number if required.

    • c!vaccine details <id>: Show details on a specific vaccine candidate. <id> must be a ID from the list_all_candidates command.

  • c!transfer_votes <amount=all>: Transfer some or all of your vote credits to this server! By default, this will transfer all your credits. You can specify a number of credits to transfer.

    Example: c!transfer_votes all will transfer all your credits to this server.

    Example: c!transfer_votes 1 will transfer 1 of your credits to this server.

  • c!news: Get the latest news on the pandemic! This will start a interactive paginator session. Use the reactions below the message to flip pages.

That's all!

You've made it to the end of the help pages! If you need more support, you can join the support server below.

Discord Server

We collect data about servers when a command is run in it. This data includes:

  • The server's ID
  • The server's name
  • If set, the guild's language.
  • If set, channel IDs and names. This data can be deleted by removing the bot from your server and requesting data be deleted in the bot's support server. You may find a link to it at the end of this document. The guild data is only collected to allow for internationalization and automatic updating.

When a user uses the bot (including but not limited to invoking a command, being banned from the bot by a admin), data about them will be collected. This data includes:

  • The user's ID
  • The user's name and discriminator
  • If set, the user's language.
  • If set, global and per-server permissions This data can be deleted by requesting the data be deleted in the bot's support server. You may find a link to it at the end of this document. However, it will all be reset to defaults upon using a command again. This user/member data is only collected to allow for internationalization and bot-banning, per-server or globally.

None of this data is shared with anyone except for the bot's core developers.

If you have concerns about this privacy policy, you may contact one of the core devs in the bot's support server at https://discord.gg/Zg35fDzvSK.

The only core developer at this moment is 0/0#0001.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment