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 Calamity Refuge Discord 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 "Hydrogen" server in Toronto.
Currently we're on version 2.10, 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]
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.
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.
regular test - One of the earliest commands to see if the bot was on.
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.
help - This thread does that now, rather than trying to fit all of this text into a discord embed.
euro - This seasonal event ran from June 23 to July 10, 2021 and allowed for UEFA Euro 2020 match betting. [demonstration]
Haha, we don't do those - get rekt
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.
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.
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
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.
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.
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 https://discord.com/channels/869038758299861064/896070008424267847/914326034978054174 or I cast timestamp 914326034978054174
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.
If you or your members are, for whatever reason, very upset by the F response, you can turn it on or off with I cast set f active or I cast set f inactive.
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.
Toggle the auto-response to *nods* by using I cast set nods active or I cast set nods inactive.
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.
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.
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.
Allows a Calamity Refuge administrator or a Refugia Councillor to terminate Dot in the event that of a critical malfunction.
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.
This feature facilitates recruitment for any NationStates region.
Because of the new restrictions regarding URL-based recruitment, this command is a mobile-oriented version of the recruit command, and uses the same recruitment system. Please see the information in recruit to set this up in your server, as this section will only cover this specific command's differences.
The mobile recruitment command functions similarly to the recruit command, except new nations are split into individual discord embeds. On mobile, you just need to tap and hold the embed for a second to copy it to your clipboard. So, ideally:
Run the command, I cast m, then tap and hold the template to copy it
Switch to the NS telegram window in your browser
Paste the template, and close the window
Open a new window and go to the telegram page
Do not touch the message body so NS will pre-load the template every time
Tap and hold the addressees Dot provided to copy them
Switch back to the NS page, paste into the recipient box
Press send and re-run the command as needed.
The template that you set in recruit is the same one as in mobile, and you can use either command to update your template. Similarly, nations that you process with the mobile command do not repeat if you leave and someone on the desktop-oriented command pick up after you. As with the desktop version, the mobile version of the command can be automated.
Use I cast m start X, where X is the interval (in minutes) that you would like to use to periodically check the site for new nations and get a reminding ping.
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.
This feature facilitates recruitment for any NationStates region.
Foreign 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. You're expected to have Discord and the NS telegram page up. Run the command and Dot will feed you the nations, broken into batches of eight (if there are more than eight new nations) when you check. Your template will also be posted so you can re-copy that if you need to. On desktop, you can triple-click each line of nations or your template to quickly load it into your clipboard.
When you use the recruit command again, you'll get nation 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 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.
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 your new nations and templates.
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.
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.
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.
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 nations not endorsing the target is small, 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.
This is a feature to help make the most least of your telegram cooldown times.
On NationStates, the cooldown that you experience in between sending telegrams is a duration that is proportionate to your nation age. If you have a very new nation, your telegram cooldown is much higher (over a minute and a half for a batch of eight). If your nation is very old (even if the population is low), your cooldown is shorter (down to 40s for a batch of eight). In order to ensure the least wasted time, this command exists to give you a timer that is appropriate for a given operator.
To use it, input what nation you'll be sending telegrams from by saying I cast timer base X, where X is your nation name. Dot will then look up your nation and give you an estimated timer based on your nation age, every time you use the command. So if you're still sending telegrams from your new nation a year from now, the timer will adjust to your gradually ageing nation and give you the duration you need at the time.
After your nation is set, you can use the timer by saying I cast timer or I cast t.
This command allows an operator to instantly check what nations have sent out the most endorsements in any given region, for use in WA development programs.
The output generated is an embeded list of the top 25 players, sorted by endorsements given, with an additional uploaded bbcode table for all nations' endorsements in the target region. You can use this table in forums, dispatches, RMB posts, and telegrams.The bbcode table acknowledges ties, so if you have a nation in first place with 100 endorsements out, but three players with 99, all three players will be reported as being tied for 2nd. The next line will be 3rd and not 5th because I think doing it any other way is really weird. To use this command, say for example I cast top endos Refugia.
If you need to have a certain number of nations highlighted for some kind of competition or acknowledgement, you can use a , X modifier, where X is how many nations you want to bold in the bbcode table. For example I cast top endos Refugia, 20 will give the normal output, but with each cell in the top 20 rows of the bbcode table set to bold.
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 a dispatch's URL or its ID.
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.
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.
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
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.
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 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.
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.
The colour command gives a large-scale visual display of a given hex code. The hex code is a required field and can feature a "#" symbol or not. For all colours entered, Dot will store the image of it that she creates, so if it is requested a second time, it doesn't need to be remade, and so we can all look back at what weird colours people have looked up over the years for absolutely neurotic purposes.
To use, say I cast colour #7B68EE to see what the colour 7B68EE looks like.
Fortune allows the user to have a randomly selected prophecy, delivered to their door, for a low-low price (none). When a user requests a fortune, one is randomly selected at the time of request and cannot be known beforehand. RNG spirits may take this opportunity to influence the result. The member's fortune will remain the same for the rest of the day, and reset at midnight, Pacific Time.
To use, say I cast fortune.
This is a function to roll one or multiple sets of dice. The dice specifications are a required field.
To use, say I cast roll, followed by the specifications on what you want to roll. The first number is how many dice you want to roll. The second number is how many sides all of the dice have. For example, saying I cast roll 8d12 will return eight comma-separated dice rolls, where all of the dice have 12 sides.
This function is limited to 100 separate rolls per command.
Sus is an Among Us minigame for Dot. In this game, for any server with Dot, several members of the server will be impostors. In-Character, they've been infiltrating for so long, they aren't even aware that their sleeper cell training has made them into deadly killers. It falls to the collective group of server members to sus them out and eject them post-haste. One individual per every 10 members (rounded up) will be an impostor.
You can say:
I cast sus inspect X to pull up the profile of another member. We've never known an impostor to have a perfect profile, so if you see something weird, it might be sus! Your phone only has batteries to bring up five profiles per day.
Suspicious content currently includes:
An ID that isn't an ID
Too many characters in a discriminator
A programming language as a blood type
A mathematics symbol as a blood type subclass
An aura that suggests an infiltrator
I cast sus banish X to safely lock away an impostor in another dimension. Well hopefully they're impostors...You only have enough spell energy to physically excommunicate three members per day.
I cast sus info to bring up your information for the day.
I cast sus inspected to get a list of who has already been scanned in this server so far today.
This minigame rests during Nightly, which occurs every day at midnight, Pacific Time.
AutoPins is a function where users can elect, amongst themselves, to pin a message in a given channel where Dot has pin permission.
For any message you wish to pin, add a "📌" react to it. If the message gets at least 5 📌 reacts, it will be pinned.
If the message loses reacts, and the pin votes are less than 5, it will be unpinned again. Democracy!
Report all errors to the local authority. Lord knows I'm sh*t at coding.. . .