WoT Clans Bot

for Discord

If you manage a Discord server focused on the World of Tanks for XBOX, I may have a bot suitable for you.

What is the WoT Clans Bot?

A Discord Bot is like a normal user on a server, it can read the messages on the channels that it has access, and respond on the channels where they can write. Thus, if you address the bot by mention (Direct Messages also works!) or by using a prefix (!w for this bot) it will talk back to you.

The WoT Clans Bot, in particular, can talk about the World of Tanks for Console game, mostly using data from the WoT Clans Site, as it has direct access to the database that powers the site.

How to Use

If the Server Admins had configured the bot on the server, and you can issue commands to it on some channels (DMs also works), you starts by typing the prefix, !w, a space and then issue a command and it's parameters.

The bot can explain itself with the command !w help, that lists all commands, and detail a command parameter with, for example, !w help moe, that will detail the parameters.

If the parameter that you want the bot to undestand contains spaces, then you must enclose the parameter in double quotes. For example, to query the leaderboad of the E 50 for the tanker Some Weird GT you type !w leader "E 50" "Some Weird GT".

Commands are grouped in features, as the list bellow inplies.

  • General
    • !w hi to be saluted;
    • !w site to receive a link to a great site;
  • Games: to help on scrimages
    • !w coin flips a coin;
    • !w dice rolls a dice;
    • !w random gets a random number;
    • !w timer starts a timer, to pick tanks, for example;
    • !w kill kills a timer that you started.
  • Tanks
    • !w moe show Marks of Excelence data;
    • !w leader show the current leaderboard;
    • !w leaderByFlag show the current leaderboard filtering by the clan flags;
    • !w damage show the Target Damage;
    • More to come... I just started the bot!
  • Clans
    • !w clan basic information about a clan;
    • More to come... I accept suggestions.
  • Players
    • !w tanker shows information about a tanker, any tanker including those not on clans;
    • !w tankerTank shows the history of tank as played by a tanker (only for tracked players, as the WG API doesn't return history);
    • !w tankerTop shows the top 25 tanks (by WN8) of a player;
    • !w tankerXP shows the top XP Earners (by XP/h) of a player;
    • !w SetWhoIAm associates your Discord User to your Gamer Tag, so you can use the key word me instead of your full Gamer Tag on commands that accepts it as a parameter;
    • !w ForgetWhoIAm removes the association between your Discord User and your Gamer Tag;
    • !w WhoIAm in case you just hit your head...
    • What else?

Remember that the bot is always improving, and this page may not be up-to-date. The !w help command is the ultimate source of what and how the bot operates.

The bot, when installed by the server administrator, is either configured to XBOX ou PS4 plataforms. This configuration is the default when retrieving information from the database. But you can override this default by prefixing p. or x. before the name of tanks, clans or gamer tags. For example !w damage x.t57 to retrieve information from the XBOX and !w damage p.t57 to retrieve information about the T57 Heavy as played by the PlayStation people.

How to Configure

The bot is added to a server the way any Discord bot is: you follow this link, choose the server on witch it will be run, and it's done... almost. Keep reading.

A bot is like a user. It may be put on other roles (besides his own role), and restrictions on that roles will be applied to the bot, as weel. Just vanilla stuff. Just don't forget that the bot needs the Discord permission Embed Links, otherwize you may not see the replies that contains links.

By default the bot will answer to anyone who calls it on a channel that it listens. But the defaults can be changed by setting permissions on Features of the bot (groups of commands) to specific channels and roles.

To understand how permissions are evalueated when a user issues a command it's important do understand the sequence of the checks:

  1. If there are a explicit permission (allow or deny) on a feature for any of the roles (tested in alphabetical order) of the user and the channel (where the command was called), then this is the permission to be applied; otherwise, to the next check...
  2. If there are a explicit permission (allow or deny) on a feature for any of the roles (tested in alphabetical order) of the user, then this is the permission to be applied; otherwise, to the next check...
  3. If there are a explicit permission (allow or deny) on a feature for the channel (where the command was called), then this is the permission to be applied; otherwise, to the next check...
  4. If there are a explicit permission (allow or deny) on a feature, then this is the permission to be applied; otherwise...
  5. The default Global Permission (allow or deny) is issued.

Remenber that the when a bot is just added to a server the default Global Permission is set to true, to allow, the execution of commands, and there are no explict permissions configured.

The permissions, and other settings, are configured using administrative commands.

Administrative commands

These commands can only be issued to the bot from users with the Administrator permission. They are also case sensitive, so a role Moderator and a rolemoderator are not the same.

  • !w admin SetPlataform (XBOX | PS): sets the default plataform, to retrieve information, to XBOX or PlayStation. The default is XBOX.
  • !w admin uptime: See information about the bot version, where it's running etc.
  • !w admin ListFeatures: Lists all the features that can have permissions.
  • !w admin ListPermissions: Lists all the explicit permissions that are configured.
  • !w admin SetDefaultPermission (true | false): Sets the global permission to allow (true) or deny (false). The default is true.
  • !w admin SetFeaturePermission feature (true | false): Set a explicit permission for a feature.
  • !w admin SetFeaturePermissionForChannel feature channel (true | false): Set a explicit permission for a feature on a channel. Don't use the # before the channel name.
  • !w admin SetFeaturePermissionForRole feature role (true | false): Set a explicit permission for a feature on a role. If the role has spaces on it's name, enclose it on double quotes.
  • !w admin SetFeaturePermissionForRoleAndChannel feature role channel(true | false): Set a explicit permission for a feature on a role and channel. If the role has spaces on it's name, enclose it on double quotes. Don't use the # before the channel name.
  • !w admin ClearFeaturePermissions feature: Clears all explicit permission for a feature.
  • !w admin ResetPermissions: Reset all the permissions to it's default state, that is, to allow everyone every feature everywhere.
  • !w admin TestPermissions feature role channel: Testes the permission for a feature on a role and channel. If the role has spaces on it's name, enclose it on double quotes. Don't use the # before the channel name.
  • !w admin SetSilentDeny (true | false): If true there will be no feedback to the user when a command is denied by some permission. The default is false.

Examples

Allow only the Games feature to a specific channel and role
  1. !w admin SetDefaultPermission false will disallow all features on every channel to every role.
  2. !w admin SetFeaturePermissionForRoleAndChannel Games moderator east-g true will allow, only on the east-g channel that people with the moderator role issues commands like timer or dice.
Deny Games features everywhere, except for people with the moderator role
  1. !w admin SetFeaturePermission Games false will deny all Games commands on every channel to every role.
  2. !w admin SetFeaturePermissionForRole Games moderator true will a allow Games commands on every channel to the role moderator.
Ban a role from using the bot
  1. Create a role on the server, something like Banned from Bot Usage.
  2. Put abusers on it.
  3. !w admin ListFeatures to see witch features the bot have. It's unlikely this list will expand.
  4. !w admin SetFeaturePermissionForRole Games "Banned from Bot Usage" false
  5. !w admin SetFeaturePermissionForRole Clans "Banned from Bot Usage" false
  6. !w admin SetFeaturePermissionForRole Players "Banned from Bot Usage" false
  7. !w admin SetFeaturePermissionForRole Tanks "Banned from Bot Usage" false
  8. !w admin SetFeaturePermissionForRole General "Banned from Bot Usage" false