FluffyCogs contains many different cogs and features, but for this post I will focus on its nationstates cog. For those interested, feel free to check out the approved repos list for other features that third party developers have added to the bot, including my own features.
Important Note: The below post is for the newest version of Red, version 3. This cog will not function with version 2 of Red. If you have the old version of Red, I recommend installing the new version as soon as you can. You can check which version you have by checking [p]info: if your discord.py version is 0.16.12 or less, then you have Red V2 installed.
Feel free to join the Red support server if you have any questions regarding Red. I will not be troubleshooting your installs here or anywhere except in that server.
- What is Red?
Red is a fully modular bot which comes with sets of features/commands that can be enabled/disabled to your liking, making it customizable exactly how you want.
You can turn Red into a trivia bot, an admin bot, a music bot (...) or all of these together.
Find it here: Install Documentation | Source Code - What is a module?
Since Red is fully modular, you can pick and choose what modules ("repositories" / "repos") you want, and from each of those, you can pick and choose what specific functionalities ("cogs") you want! FluffyCogs is just that: a repo containing several cogs, including the nationstates cog and a few other useful or fun cogs I've developed.
Please note for the below that [p] is shorthand - when actually running the commands, be sure to replace [p] with your bot's prefix. For example, my bot's prefix is an exclamation point, so instead of using [p]nation, I would use !nation.
The nationstates cog uses the sans pip library. Find its source code here.
The nationstates cog contains the following commands and features:
- [p]agent
Sets the user agent to be used with the NationStates API. It's recommended to use your nation name and email, or some method of contacting you. The cog will add some information about the scripts you are using for ease of troubleshooting.
If the agent isn't specified, it will default to your Discord username and hash. This will likely be removed in the future, so be sure to set your user agent yourself. - [p]nation
Shows general information on the specified nation.
The Last Active field is adjusted to the timezone of the viewer automatically. - [p]region
Shows general information on the specified region.
The Last Updated field is adjusted to the timezone of the viewer automatically. - [p]card
Shows general information on the specified card. - [p]deck
Shows general information on the specified deck. - [p]wa / [p]ga / [p]sc
The above all point to the same command, though the [p]sc version will point to the Security Council instead of the General Assembly.
Gets general information on the specified resolution by ID.
If no ID is provided, a summary of the current proposal, or the previous proposal if there is no current one, is returned.
Various options are supported to get more information on the current resolution:- text - The resolution's text
- votes - The total votes for and against
- nations - The total nations for and against
- delegates - The top ten Delegates for and against
The Passed and Voting Ends fields are adjusted to the timezone of the viewer automatically.
As a bonus, the bot will also give a short summary of past resolutions when it sees GA#XXX or SC#XXX in a message. GAR#XXX and SCR#XXX is also supported.
Currently there is no option to disable this, but a command to toggle this behavior is planned. - [p]shard
Returns raw data from the NationStates API according to various UNIX-style parameters.
Useful for creating custom aliases to get specific data, e.g.: [p]alias add wacensus shard census --mode "score rrank" --scale "65 66" --nation *
An asterisk (*) may be used to cause the command to consume the rest of the arguments at once, even without quotes. - [p]ne
Nations Endorsing (NE) the specified WA nation. - [p]nec
Nations Endorsing [Count] (NEC) the specified WA nation. - [p]spdr
Soft Power Disbursement Rating (SPDR, aka numerical Influence) of the specified nation. - [p]nne
Nations Not Endorsing (NNE) the specified WA nation. - [p]nnec
Nations Not Endorsing [Count] (NNEC) the specified WA nation.
If you're convinced and wish to install this cog, just use these three commands:
- Code: Select all
[p]repo add FluffyCogs https://github.com/zephyrkul/FluffyCogs
[p]cog install FluffyCogs nationstates
[p]load nationstates