A node.js discord bot written to monitor the Clash of Clans API and announce war attacks to a discord channel. It will also announce when prep day has started and when war day begins. There is also a reminder message 1 hour before war ends. There is a final message that announces 15 minutes, by default, before war ends.
No longer maintained feel free to fork and edit the code. It is provided as is.
Manage Channel
permissions for the server assign a clan with the command !announce #CLANTAG
in the channel you want messages in.!unannounce #CLANTAG
requires the same permission as the !announce
command.!announce #CLANTAG
Assign a clan to announce in a channel.!unannounce #CLANTAG
Stop a clan from announcing in a channel.!warstats #CLANTAG
Display war stats for a clan that is tracked by The Announcer. If not provided with a clan tag it will display war stats for all clans assigned to the channel the command was run in.!hitrate #CLANTAG
Display hit rate stats for a clan that is tracked by The Announcer. If not provided with a clan tag it will display hit rate stats for all clans assigned to the channel the command was run in.!playerstats #PLAYERTAG
Display player stats for any player tag provided.!style [1-6](+)
Choose a style to use for war attacks in this channel. Requires a number to select style type, optionally append a + if you want war stats included in every message.!styletest
Show a preview of all styles.!showmissing [yes,no]
Show missing attacks with final hours and final minutes messages. Default value is no.!info
Display bot information.!help
Display list of commands.npm i
to install the node modules.config.example.js
to config.js
.config.js
under coc->apiKey
.config.js
under discord->clientId
and discord->userToken
.https://discordapp.com/oauth2/authorize?client_id=__CLIENT_ID__&scope=bot&permissions=396352
and replace __CLIENT_ID__
with your bot's client idnode index.js
to start the bot.!warstats
into chat. If you have multiple clan's attacks showing up in a single channel you can use !warstats #CLANTAG
to get stats for a specific clan.Q: Can I customize the emojis the bot uses?
A: Yes you can by uploading you own emojis and using the names below
Name | Meaning |
---|---|
dwasword | Attack Success |
dwaswordbroken | Attack Failed |
dwashield | Defend Success |
dwashieldbroken | Defend Failed |
dwastar | Star |
dwastarnew | New Star |
dwastarempty | Empty Star |