General > The Admin Tower

Dot - How Does

(1/2) > >>

Calamity Refuge's own Multi-Purpose Discord Chatbot


The name "Dot" had been a testing account that I've used to check forum permissions since 2014, with the name being based on Halo Reach's AI by the same name. Dot as a Discord bot, however, was created in November of 2020 and has a much more human persona. Originally, she was created to provide the server with a NationStates endotarting feature. As you would expect, this is the one feature I have not bothered to write yet. Instead, she takes over a number of functions that our previous chatbot, Ligrev, provided until 2018. Dot is written in python and hosted on CalRef's "Bismuth" server in Toronto.

Currently we're on version 2.7, and development is pretty constant. You can follow my updates and project progress by keeping up with the CalRef Development Journal.

Because Dot has picked up so many features and abilities for a variety of needs, this thread now serves as a more comprehensive How Does and help thread for these functions. Generally, Dot's commands can be broken into the categories below. Click the [more] link attached to each category to be taken to the post which has detailed information on the commands therein. CalRef-only commands will only trigger on our server, and are denoted with our flag:

Invite Dot to your sever today with this handy dandy [Invite Link]


Dot's command prefix is "I cast". If you forget what commands there are, you can simply say I cast commands to bring them up.

Server Commands
[*]avatar - Allows you to see a requested user's avatar, or your own. [/list]
[*]info - Information about your Discord account, or another's. [/list]
[*]roster - Displays the total members who have a given role. [/list]
[*]rotate - Allows you to "adjust" the server icon, for some reason. [/list]
[*]server - Tells you information about your server or another one.[/list]
[*]timestamp - Provides the exact time a given message was sent.[/list]

Admin Commands
[*]prune - Clears the last X number of posts from the channel. [/list]
[*]set farewell - Configures a message to notify when members leave. [/list]
[*]set nods - Toggle the *nods* autoresponse. [/list]
[*]set recruiter - Designates a role for members authorised to do NS recruitment.[/list]
[*]set welcome - Configures a message to welcome members to the server. [/list]
[*]spin up/down - Activates, rotates, or deactivates server invites. [/list]
[*]vanquish - Immediately kills Dot if an admin notices a critical error. [/list]


NationStates Commands
[*]GAR/SC - Gives a passed World Assembly resolution.[/list]
[*]nation - Gives you information about an NationStates nation. [/list]
[*]recruit - Call for aid in your manual recruitment endeavours. [/list]
[*]region - Gives you information about an NationStates region. [/list]
[*]save - Builds an archive of a region's RMB and history. [/list]
[*]slackers - Locates WA nations in a region not endorsing a target.[/list]
[*]telegrams - Displays how many queued telegrams are in the pipe. [/list]
[*]truesight - Displays the real score of a dispatch downvoted below 1. [/list]
[*]WA - Shows the current World Assembly vote status. [/list]

Economy Commands
[*]bank - Displays the bank information of the member or another member. [/list]
[*]buy/sell - Exchange planets and stock in the stock market. [/list]
[*]give - Donates planets to another member. [/list]
[*]infinity - A charity agency rewriting spacetime and destroying evil.[/list]
[*]stocks - Displays all stock information from the Refuge Securities Exchange [/list]
[*]study - Look at historical trend data for all available stocks. [/list]


Misc. Commands
[*]colour/color - Spits out a big bright display of a hex code.[/list]
[*]fortune - Randomly selects your fortune. Limit 1 per day. [/list]
[*]magic - Selects a magic type from the crowdsourced magic list. [/list]
[*]roll - Rolls dice, size and quantity determined by the user. [/list]
[*]sus - Opens Dot's Among Us minigame. [/list]

Additional Features
[*]autopins - A democratic way for members to pin "important" messages. [/list]
[*]message credit - Provides :planet: rewards for member chat activity.[/list]
[*]log-in/log-out - Allows members to come and go, but retain their roles. [/list]
[*]nods - Expresses agreement when agreement is expressed.[/list]
[*]autoresponses - Dot responds to praise, scorn, pings, and thanks.[/list]
[*]F - Joins members in expressing appropriate condolences.[/list]



I haven't really been tracking what all has been taken out, but I seem to recall the following things which are no longer things:

[*]90s - A feature which provided timely posts of the 90s music video.[/list]
[*]changelog - Which allowed you to see my own running changelog to monitor Dot's progress. This has been moved to the CalRef Development Journal since April 12th.[/list]
[*]regular test - One of the earliest commands to see if the bot was on.[/list]
[*]catscan - Which parsed the nation dump to receive classification stats on regions' population. May come back, not sure, would need to be rewritten from scratch.[/list]
[*]help - This thread does that now, rather than trying to fit all of this text into a discord embed.[/list]
[*]euro - This seasonal event ran from June 23 to July 10, 2021 and allowed for UEFA Euro 2020 match betting. [demonstration][/list]


Haha, we don't do those - get rekt

Server Commands
[X] indicates optional argument fields     |     [X] indicates required argument fields
Avatar [X]Demonstration
This is a function to display a member's full resolution avatar and post a URL to it's actual file. All images are converted to png where possible. You can say I cast avatar, and this will bring up your own avatar image. You can also pull up someone else's avatar by attaching their ID, username, or server nick to the command.

For example I cast avatar Aang will bring up that member's profile picture, if they can be located.

Remember that Discord will delete old avatars after members change them, so past URLs will not lead to old avatar files after they're gone.

Info [X]Demonstration
This is a function to detail information about a member. The information provided includes the member's username, nickname, ID, account creation date, current activity, server roles, and avatar. If the member does not have an ongoing activity, they will be listed as existing in a perpetual state. By default, using I cast info will bring up information about your own account. To select a different member of the server you're in, you can use that member's ID, username, or nick.

For example, I cast info Natalie will provide information on this very suspicious user.

Roster [X]Demonstration
This is a function to list the total members who have a given role. The output will display their ID and their username + discriminator. If the role has a colour attached to it, the sidebar of the response will have that colour, otherwise, it will have Dot's default blue. The total number of users is displayed in the footer text. You can search by role name, ID, or ping.

For example, I cast roster councillor or I cast roster 755244583100612669

Rotate Demonstration
This command allows any user to switch out the current server icon with a different icon from a pool of pre-set possibilities. The new icon will be randomly selected, but continuously rerolled until it is different from whatever the current icon is. This feature has a server-wide cooldown of five minutes. Rotate also has other aliases, including rotato, potato, tomato, 🥔, and 🍅.

Presently, it is only available for the CalRef's server. However, in a future update, any admin will be able to link or upload icons and and make this feature available.

Server [X]Demonstration
This is a function to detail information about a server. Such information includes who the root admin is, VC region, members, channels, creation date, ID, server boosts and boost status. Dot will also take the liberty of rating the quality of the selected server. For all servers that require two-factor mobile authentication, the quality will be listed as "garbage". For all others, it will be listed as "Fantastic". If the selected server has an invite splash banner, that image will be provided with this command.

By default, using I cast server will bring up information about the server you are in. To select another server, use its ID. For example, I cast server 755208088734269481. You can select any server on the Relay.

Timestamp [X]Demonstration
As discord only provides timestamps down to the minute, this is a function to provide timestamps down to the second, for whenever precision at this level becomes a point of dispute.

You can use a full message's URL or just the message ID, it does not matter.

For example, I cast timestamp or I cast timestamp 914326034978054174

Admin Commands
(Requires Administrator)
[X] indicates optional argument fields     |     [X] indicates required argument fields

Prune [X]Demonstration
This function clears a specified number of messages from the channel that it is sent in. You can use the command by saying I cast prune X where X is the number of messages you wish to clear. The messages that are cleared using this method are not recorded, however the instance of the prune command being used is, so that there is a paper trail in case of malicious use.

There is a hard coded limit of 50 messages for each use of the command.

Set farewell [X]Demonstration
Provides an automatic message posted to a pre-set channel when a member leaves the server. I cast set farewell command provides a built-in help message to guide users through the process. Begin by designating a channel to post in.

You can say I cast set farewell channel X, where X is either tagging the channel, or the channel's ID. For example, I cast set farewell channel #landing
With the channel set, you can turn messages on or off with I cast set farewell active or I cast set farewell inactive.
You can customise the image posted on a member departure with I cast set farewell image X, where X is a URL to your desired image.

Set nods [X]
Toggle the auto-response to *nods* by using I cast set nods active or I cast set nods inactive.

Set recruiter [X]Demonstration
Allows an administrator to designate one of the roles on their server as containing members authorised to use Dot's manual recruitment function for their NationStates region. In the required field, you can tag the role by mention or you can post the role's ID.

For example, I cast set recruiter @Recruiter or I cast set recruiter 862846879611617280.

Set welcome [X]Demonstration
Provides and automatic message posted to a pre-set channel when a member joins the server. I cast set welcome command provides a built-in help message to guide users through the process. Begin by designating a channel you would like the post to appear in.

You can say I cast set welcome channel X, where X is either tagging the channel, or the channel's ID.
With the channel set, you can turn messages on or off with I cast set welcome active or I cast set welcome inactive.

By default, these messages will welcome members to the Largest Warhammer 40k Discussion Forum on the InternetTM, so let's customise them further.

Set the title of your welcome message with I cast set welcome title X.
Set the URL that surrounds this title with I cast set welcome URL X.
Set welcome message body with I cast set welcome message X.
Set an image running across the bottom of the message with I cast set welcome image X.

See the demonstration on the right for examples.

Spin up/down Demonstration
Allows a Calamity Refuge administrator or a Refugia Councillor to terminate all existing invites to the server, replace them, or switch out invites that already exist. Dot will instantly publish any new invites to the CalRef chat URL so no hard coded intervention is needed.

Vanquish Demonstration
Allows a Calamity Refuge administrator or a Refugia Councillor to terminate Dot in the event that of a critical malfunction.

NationStates Commands
(Utilities for
[X] indicates optional argument fields     |     [X] indicates required argument fields

GAR/SC [X]Demonstration
This function locates and links to a General Assembly or Security Council resolution, and provides some overview information about it. Such information includes its title, URL, tagline, category, scope, author, votes for and against, ID, passage date, and a short blurb from the actual resolution content with BB code translated to discord markup. For repeals, the response's "scope" field is replaced with the repeal's target. For commendations and condemnations, the scope field is replaced with the resolution's target.

To use this command, you must specify which chamber you are searching in and you must provide their resolution number. You can use a # symbol before the resolution number, or not if you wish, but there must be a space between GAR or SC and the number. For example, I cast GAR 473 or I cast SC 326.

Nation [X]Demonstration
Reports information for the current status of a NationStates nation. This information includes the full name with pretitle, inside a URL to the account, the nation's classification and region it is presently in, as well as its ID, flag, found date, and World Assembly status. For nations which are in the World Assembly, the command will also report whether or not the nation is a delegate, how many endorsements the nation has, and which way it has voted (if at all), for any current World Assembly votes.

A nation name must be specified to use this command. For example, I cast nation Sylh Alanor.

Recruit [X]Demonstration
This feature facilitates recruitment for any NationStates region.

Server admins: Get started by designating a recruiter role in your server. Use I cast set recruiter X, where X is either pinging the role you're designating, or the role's ID.

For best practices, use the optional function I cast recruit template X where X is your template code. The recruit function will auto-load your template into a telegram link. This template is unique to each individual user. If multiple people are regularly recruit in your region, no worries, Dot knows the difference. If you are recruiting for more than one region, that's fine too! Your template is also exclusive to each server you are in.

Say I cast recruit, or if you're lazy, I cast r to begin. You will get all the recent nations that have been founded, broken into batches of eight, and with those eight nations preloaded into a telegram link (with a template code, if you have one). All you need to do is click the provided links, send, and move on.

There is a telegram cooldown (which also applies to RMB postes, weirdly enough) proportional to how many people you send a telegram to. The cooldown for one recipient is around five seconds, and so the cooldown for eight is around 40 seconds. In order to make things easier to track, you can use the command I cast recruit timer or I cast r t to start a 45-second timer and get pinged when the cooldown has ended.

Regions with API recruitment enabled for their region experience longer cooldowns for manual recruitment. You can use I cast r a to begin a reminder timer for a batch of eight's cooldown for regions like these (one minute, twenty seconds).

When you use the recruit command again, you'll get telegram links for nation batches that have been founded since the last time you ran the command. So each response message you get back from Dot will be unique and you won't be sending two messages to the same person. Recruiters need not worry about puppet flooding, at least within reasonable levels, as Dot has a built-in filter for obvious puppets. When you're done, if someone starts up after you, they'll be able to pick up where you left off - no duplicates or overlap! Consider checking for new nations every 3-5 minutes. Most manual recruitment is useless after that, as the telegram will never arrive in a timely manner.

Recruiting also has a discrete :planet: payment feature in Dot's economy as a bonus for successfully locating target nations.

Dot recruitment also has an automated mode, so that repeated manual checks of new nations are not required.Demonstration

Begin the automation by using I cast recruit start [X], where X is the interval, in minutes, that you would like to work with. For example, I cast recruit start 5 will begin automated recruitment checks every five minutes. At the five minute mark, Dot will check for new nations. If there are any, you will get a ping in the channel so you will be reminded you're recruiting along with links to the new nations, broken into batches of eight, and with your template already loaded (if you provided one).

At the bottom of this post is a button to acknowledge the report. Doing so tells Dot that you have cleared your queue and are ready to proceed. Dot will then sweep all old nations into the processed nations bin and start checking for new founds again. She will not check for new nations until you have cleared your queue, but if anything new comes up, she'll let you know without further input on your part.

You can use any interval you wish between one and ten minutes.

If you have not acknowledged the automated recruitment report within ten minutes, or if NationStates dies as it is wont to do, the recruitment will be deactivated so that Dot's brain doesn't explode.

When you have finished your recruitment session, simply type I cast recruit finished. Remember that any other authorised recruiter in the server can start up recruitment after you and pick up where you left off.

Region [X]Demonstration
Reports information for the current status of a NationStated region. This information includes the URL, flag, founder, population, delegate (if any), how many votes an applicable delegate casts in the World Assembly, number of embassies, regional power, found date, and ID. It also reports how many votes for and against have come out of the region in any World Assembly resolutions at vote.

A region name must be specified to use this command. For example, I cast region Refugia.

Save [X]Demonstration
The save command allows you to back up any user-created region on NationStates by copying its RMB, recording its regional history, and compiling it into an archive that can be unzipped and hosted on any server. To activate it, say I cast save X, where X is your desired region. For example, I cast save Refugia.

This archive has been specifically designed to replicate as much of the original RMB post environment as is feasible, so you'll not only have your data, you'll have some of the original experience as well. This archive splits the RMB history into 100 messages per page, with a handy nav bar at the top and bottom of the screen. Bold, italics, underline, strike, nation tags, region tags, quote tags, and url tags are all supported and translated from bbcode to html.

At the top of every RMB page, there will be a link to a replica of your region's history. All major events like delegate changes, embassy movements, Security Council action and more will be located here. The top of this history page features a chart, which will show you a graph of your region's population similarly to the way NationStates displays one. So this, too, is preserved. If you want to take out that data and use it somewhere else, there is a "Source" link below the chart, so you can get my generated population spreadsheet. My population records go back to 2012.

When the archive is ready, Dot will provide you a link to the zip file containing your region's archive. That archive will be retained on CalRef servers so that if you happen to lose it, your region will not be gone forever.

There is an example of a saved region available on the network site.

Slackers [X]Demonstration
The slackers command locates all of the World Assembly nations inside a target's region who are not endorsing that target. If the number of returned nations is low, , Dot will respond with an embed that has links to all the located nations, along with a text file attachment. The attachment has the names broken into lines of eight in case you wish to manually telegram them, asking for an endorsement. If the number of nations not endorsing the target is very large, you will only receive the attachment along with the total number of WA nations not endorsing the target.

To use, say something like I cast slackers Sylh Alanor.

The telegrams command allows you to see how many telegrams are currently queued across NationStates, by type. The vast majority of all telegrams in this queue are recruitment tagged telegrams. When recruiting for a region by way of stamps, if the number of queued stamp telegrams are around 20,000, the efficiency of the campaign will be low, as it becomes statistically less likely to be in first of telegrams a nation receives. If the number of stamps telegrams queued is around 10,000, the value is much higher. For all values over 25,000, stamp recruitment is functionally worthless.

To use, say I cast telegrams.

Truesight [X]Demonstration
For dispatches and factbooks on NationStates, players can upvote or downvote them to allow them to populate on the trending dispatches or just demonstrate support. The upvotes appear in the upper right of the screen. However, if a dispatch becomes downvoted below 0, a score of 1 will still be displayed. The dispatch's true score is still available through an API call, and Dot's truesight command can provide that real number if it is ever desired.

To use, say I cast truesight X, where X is the dispatch ID (located in its URL).

The WA command gives you the current status of the World Assembly by displaying what resolutions are at vote. Displayed data includes a resolution title, URL, category, scope, author (with URL), when it began, how many hours remain, and what the total and popular vote stats are. Dot takes the total voting percentages for each chamber and combines them into a graphic display of how the vote is going, similar to how it appears on the actual World Assembly page.

To use, say I cast WA.

Economy Commands
[X] indicates optional argument fields     |     [X] indicates required argument fields

Bank [X]Demonstration
Produces the contents of your bank within Dot's economy, including your balance in planets, stocks, and any seasonal extras which are in your portfolio. By default, the bank command shows your account; however, you can also target other players and see their portfolios by using their ID, username, or nick.

For example, I cast bank for your own or, I cast bank Emily for Emily's account.

Buy/sell [X] [X]Demonstration
Allows you to buy or sell shares of stock on the Refuge Securities Exchange. A list of stocks can be found by using the stocks command, or by trying to buy or sell something that doesn't exist. When you wish to carry out a transaction, it does not matter whether the number or target stock is first in the command, as long as both are present.

You can say:
I cast buy THI 1 or I cast buy 1 THI
I cast sell THI 1 or I cast sell 1 THI

Give [X] [X]Demonstration
This command allows you to carry out a transfer of planets from your account to another player's account, without transaction fees. The player you wish to target is a required field, and can be selected by referenced by ID, username, or server nickname.

You can say I cast give 1000 Argo or I cast give Argo 1000 to transfer 1000 planets to Argo.

Infinity [X]Demonstration
The Infinity project is a way for members to donate money to an In-Character charity project. The types of work Infinity carries out is always strange, supernatural, novelty, or in other ways extraordinary, but always done with the justification that it will create a utopia across the galaxy and across dimensions. In a future update, there will be a way to check the leaderboard of players who have contributed the most to this project.

Players who donate ten million planets across their lifetime will receive a forum badge that highlights their incredible contribution:

To see the current status of the Infinity Project, say I cast infinity.
To donate to the project, say I cast infinity donate 1000 to transfer :planet: 1,000 to their account.

If you'd like to see the top Infinity players, you can use I cast infinity leaderboard to see how you stack up.

This command gives the current price of all stocks in the Refuge Securities Exchange. Stock names and their ticker symbols are provided, alongside the direction the price has been trending over the last week. Stock prices are refreshed every six hours, at midnight, noon, six, and six, Pacific Time.

To get the latest information, say I cast stocks.

Study [X]Demonstration
Where the stocks command provides the latest information, the study command provides more detailed information about a stock's price history. The ticker symbol of the stock you wish to study is a required field for this feature.

Selecting a stock, Dot will return the stock's name, slogan, logo, current price, and weekly trending direction. For analysation purposes, a snapshot of the stock's price at midnight across the last seven days is provided in text form. A graph featuring every available six hour data point is also provided for as long as the stock has existed, or for as long as it's price mechanics have remained the same.

To use, say something like I cast study THI to get study information about Tim Hortons Inc.


[0] Message Index

[#] Next page

Go to full version