Discord bot for Clash of Clans discord servers written in Python
ClashCommander is a discord bot written in Python that, while having a great many uses and commands, focuses primarily on discord member management. This entails, but is not limited to, adding an uninitiated role to incoming members, allowing members to give themselves roles based on their clash of clans profile, sending out announcements, updating discord user nicknames based on their player name, and focusing on discord server security.
Non-management commands include, but are also not limited to, returning player, clan, war, or CWL information. You can use ClashCommander to get player troop levels, clan donations, clan member war preference, war attacks and open bases, cwl scoreboard and lineups, and much much more!
Getting ClashCommander set up in your discord server can be somewhat confusing, but never fear for I am here.
-
invite ClashCommander to your discord server
-
claim your user in ClashCommander
client user
claim
- this will claim you as a user
-
claim your discord server
admin guild
claim
- this will claim your discord server and add you as the guild admin within ClashCommander
- guild is what the discord API calls a server
-
link a player to your user
client player
claim
player tag
api key
- claims the requested player and links it to your discord user
- getting your api key is annoying, but for everyone’s security this is necessary
-
link a clan to your guild
admin clan
claim
clan tag
- claims a clan and links it to the claimed guild
- a linked player must be in the clan
- this is also for security
-
link existing roles to your server
A. claim clan roles
admin clanrole
claim
clan tag
role mention
- links the clan role to a claimed clan
B. claim rank roles
admin rankrole
claim
rank name
role mention
- links the rank role to a discord role
- leader
- co-leader
- elder
- member
- uninitiated
- this means they aren't verified or they aren't in a claimed clan
- links the rank role to a discord role
-
Use ClashCommander, you are set up!
- invite Clash Discord to your server
- claim your discord user
- claim the guild
- claim your player
- claim your clan
- claim the necessary roles
ClashCommander is largely command focused, meaning it doesn't do anything that it is not told to do. The only exception to this is when a member joins. If a server has claimed an uninitiated role, then they will be given that role, otherwise nothing will happen. The other action ClashCommander will take is if it detects a role being deleted from discord it will delete the database instance of that role.
Once setup is complete you will be able to interact with ClashCommander using the prefix /
and run the commands as desired.
-
- help
- displays relevant help-text regarding what commands can be run
- react to the help message to parse through command groups
- help
-
-
client info
- overview for the client
-
client user
- client user options
- options for
client user
command profile
default - return your user profileplayer list
- list claimed players- this command is great for copying tags from mobile
update
- updates the requested player as your active player- values needed -
player tag
- values needed -
sync
- syncs your player information with LinkAPI centralized dataclaim
- claim your userremove
- removes your user- also removes all linked players
- options for
- client user options
-
client player
- client player options
- options for
client player
command claim
- links a specified player to your user- values needed -
player tag
api key
- values needed -
remove
- removes the linked player from your user- values needed -
player tag
- values needed -
- options for
- client player options
-
client clan
- client clan options
- options for
client clan
command show
default - return all claimed clans
- options for
- client clan options
-
-
-
all admin commands require ClashCommander server admin access
-
admin user
- admin user options
- options for
admin player
command profile
default - return specified user profileplayer list
- list claimed players for specified user- this command is great for copying tags from mobile
sync
- syncs player information with LinkAPI centralized data for userupdate
- updates the requested player as the active player for the user- values needed -
player tag
- values needed -
- options for
- admin user options
-
admin player
- admin player options
- options for
admin player
command claim
- links a player to the userremove
- removes the player from the user
- options for
- admin player options
-
admin clan
- admin clan options
- options for
admin clan
command show
default - return all claimed clansclaim
- links a specified clan to your guild- values needed -
clan tag
- values needed -
remove
- removes the linked clan from your guild- values needed -
clan tag
- values needed -
- options for
- admin clan options
-
admin role
- admin role options
- options for
admin role
command show
default - return all linked rolesremove
- removes claim on the mentioned role- values needed -
role mention
- values needed -
- options for
- admin role options
-
admin clanrole
- admin clanrole options
- options for
admin clanrole
command claim
- links a specified clanrole the specified guild's claimed clan- values needed -
role mention
clan tag
- values needed -
- options for
- admin clanrole options
-
admin rankrole
- admin rankrole options
- options for
admin rankrole
command claim
- links a specified rankrole the specified Clash of Clans rank- values needed -
role mention
rank name
- rank names
- leader
- co-leader
- elder
- member
- uninitiated
- this means they aren't verified or they aren't in a claimed clan
- values needed -
- options for
- admin rankrole options
-
admin guild
- claims the guild by discord guild id within ClashCommander
- sets the user who called the command as the guild admin within ClashCommander
- if the guild has already been claimed, then nothing will happen
-
-
-
discord role
- update roles
- discord role options
- options for
discord role
command me
default - updating your (author's) rolesmember
- updates the specified user's roles- restricted to leaders and co-leaders
- user must be specified
all
- updates ALL guild user's roles- restricted to ClashCommander server admin
- options for
-
discord nickname
- update nicknames
- discord nickname options
- options for
discord nickname
command me
default - updating your (author's) nicknamemember
- updates the specified user's nickname- restricted to leaders and co-leaders
- user must be specified
all
- updates ALL guild user's nickname- restricted to ClashCommander server admin
- options for
-
discord emoji
coc_name
- sends specified emoji
-
discord user
- returns the user linked to a requested player
- discord user options
- options for
discord user
command player
- finding the linked user to the specified player- player tag must be specified
clan
default - finding the linked user for each member in the clan- restricted to leaders and co-leaders
- if no clan role is specified, then the user's active player's clan will be used
- options for
-
-
-
- options for announce commands
channel
- specify a channel to send the announcement to that channel- if no channel is specified, then the announcement will be sent to the current channel
-
announce message
channel
message
- announces message to specified channel
- restricted to leaders and co-leaders
-
announce player
channel
message
player tag
- announces message to specified channel, pings the requested player's user
- restricted to leaders and co-leaders
-
announce donate
channel
message
unit name
- announces message to specified channel, pings all users that can donate the requested
- announce donate options
- options for
announce donate
commandclan_role
- mention a role linked to a clan to get that clan's information- if no clan role is specified, then the user's active player's clan will be used
- options for
-
announce supertroop
channel
message
super troop name
- announces message to specified channel, pings all users that have the requested super troop active
- announce supertroop options
- options for
announce supertroop
commandclan_role
- mention a role linked to a clan to get that clan's information- if no clan role is specified, then the user's active player's clan will be used
- options for
-
announce war
channel
message
- announces message to specified channel, pings all in current war
- restricted to leaders and co-leaders
- announce war options
- options for
announce war
commandclan_role
- mention a role linked to a clan to get that clan's information- if no clan role is specified, then the user's active player's clan will be used
cwl_war_selection
- only for cwl specify whether to look for the previous, current, or upcoming war- defaults to current
- options for
-
announce warmissingattacks
channel
message
- announces message to channel, pings all in war missing attacks
- restricted to leaders and co-leaders
- announce warmissingattacks options
- options for
announce warmissingattacks
commandclan_role
- mention a role linked to a clan to get that clan's information- if no clan role is specified, then the user's active player's clan will be used
missed_attacks
- returns players who missed exactly the specified missed attack count- if not specified, then it will simply return all who are or have missed attacks
cwl_war_selection
- only for cwl specify whether to look for the previous, current, or upcoming war- defaults to current
- options for
-
-
-
- options for player commands
user
- mention a user to get their active player's information- if no user is specified, then the user's active player will be used
tag
- specify a player's tag for that player's information- if no tag is specified, then the user's active player will be used
-
player info
- shows player information based on your active player
-
player recruit
- displays player recruit information for requested player tag
-
player unit all
- shows the level your units based on the specified type
-
player unit find
unit name
- shows the level, town hall max, and overall max levels for the requested unit
- you can search troops, spells, and heroes
- example
/player unit find hog rider
/player unit find jump spell
/player unit find archer queen
-
player supertroop
- shows the super troops you have active
-
-
-
- options for clan commands
clan_role
- mention a role linked to a clan to get that clan's information- if no clan role is specified, then the user's active player's clan will be used
tag
- specify a clan's tag for that clan's information- if no tag is specified, then the user's active player's clan will be used
-
clan info
- displays clan information
-
clan lineup
- displays clan town hall lineup
- clan lineup options
- options for
clan lineup
command overview
default - returns an overview of the clan's town hall lineupmember
- returns each member of the clan and their town hall and their hero levelscount
- returns a count of the clan's town hall lineup
- options for
-
clan warpreference
- displays rundown of clan member's war preference
- clan warpreference options
- options for
clan warpreference
command overview
default - returns each member of the clan and their war preferencecount
- returns a count of those that are in and out
- options for
-
clan donate
unit name
- search the clan for available donors for a specified unit
- examples
/clan donate hog rider
/clan donate freeze spell
-
clan supertroop
- shows all active super troops in the clan
- clan supertroop option
- option for
clan supertroop
command super_troop
- if a super troop is specified, then it will search the clan and show who has the specified super troop active
- option for
-
-
-
- options for war commands
clan_role
- mention a role linked to a clan to get that clan's war information- if no clan role is specified, then the user's active player's clan will be used
cwl_war_selection
- only for cwl specify whether to look for the previous, current, or upcoming war- defaults to current
-
war info
- displays war information
-
war missingattacks
- lists players that missed attacks in war
- war missingattacks option
- option for
war missingattacks
command missed_attacks
- returns players who missed exactly the specified missed attack count- if not specified, then it will simply return all who are or have missed attacks
- option for
-
war open
- show opponent bases that are open
- war open option
star_count
- star count selection for open bases- if not specified, then it show all open bases that haven't been 3 starred
-
war stars
- show all war members and their stars
- war stars options
- options for
war stars
command stars
default - returns all war members and their starsmember
- show all war members and their attacks
- options for
-
war score user
- user's active player's war score
- war score user option
- option for
war score user
command user
- returns the mentioned user's active player's war score- if not specified, then it will return the author's active player's war score
- option for
-
war score clan
- every clan member's war score
- restricted to leaders and co-leaders
-
war lineup
- war town hall lineup
- war lineup options
- options for
war lineup
command overview
- short overview of the war's lineupclan
default - war lineup for each clanmember
- lineup for every member in war
- options for
-
-
-
- options for cwl commands
clan_role
- mention a role linked to a clan to get that clan's cwl information- if no clan role is specified, then the user's active player's clan will be used
-
cwl info
- CWL info
-
cwl lineup
- CWL town hall lineup
- cwl lineup options
- options for
cwl lineup
command overview
- short overview of the cwl's lineupclan
default - cwl lineup for each clanmember
- lineup for every member in each clan in cwl
- options for
-
cwl scoreboard
- CWL scoreboard
- cwl scoreboard options
- options for
cwl scoreboard
command group
default - cwl scoreboard for the grouprounds
- cwl scoreboard for each roundclan
- cwl scoreboard for each clan member
- options for
-
cwl missingattacks
- lists players that missed attacks in cwl
-
cwl score user
- user's active player's cwl score
- cwl score user option
- option for
cwl score user
command user
- returns the mentioned user's active player's cwl score- if not specified, then it will return the author's active player's cwl score
- option for
-
cwl score clan
- every clan member's cwl score
- restricted to leaders and co-leaders
-
If you would like to contribute to this project please message me on discord or email me. I currently do not have any contribution instruction and will figure that out when the time comes if someone would like to.
There aren't many required packages, but here are the few that are required and the versions I am using.
Official ClashCommander Server
Email: [email protected]