Description

Clash Caller bot

View on GitHub

Description

A Clash Caller bot for Discord. Based off of cc-bot and DiscordBot.

Screenshots

/status

/summary

/call and /attacked

/stats

Installation

Visit https://discordapp.com/oauth2/authorize?client_id=295229962045358083&scope=bot&permissions=0 and select which server to add the bot to.

Note that by default the bot will work in all channels on your server that it has READ and WRITE access to. If you want to only enable it for certain channels, disable its READ access on those channels (disable WRITE access on the default channel since you can’t disable READ on that one).

Also note that the war data is unique per channel. This means that you can have multiple channels in different wars on the same server, which is useful for clans who have feeders or sister clans all in the same server.

Setup

  • /setclantag
    • Sets the clan tag for new wars. Required for /stats and /summary to work.
  • /setcalltimer <# hours>
    • Sets the call timer for new wars (use 1/2 or 1/4 for flex timers)
  • /setautosync on
    • ccbot will automatically sync with data from Clash of Clans. This will enable automatic logging of attacks and starting of Clash Caller wars (requires your war log be public)

Normal usage

  • /start
    • Starts a new war
  • /call <enemy base #>
    • Calls a base for you in the current war
  • /attacked <enemy base #> for <# stars>
    • Records an attack for you in the current war
  • /status
    • Shows the current war status
  • /calls
    • Shows all active calls

There are lots of other features including member stats, war summaries, and configuration options. Type “/help” to get a full list of available commands.

Running locally

Create an auth.json and configs.json file (see auth.json.example and configs.json.example for what these should look like) then run npm start.

Creating your own bot

Create a Discord bot by visiting https://discordapp.com/developers/applications/me and click on “New App”. Follow the steps and you’ll eventually be redirected to a page that contains your bot’s client ID and token.

To add your bot to a Discord server, visit https://discordapp.com/oauth2/authorize?client_id=ENTER_YOUR_CLIENT_ID_HERE&scope=bot&permissions=0 and add it to one of the servers you are logged into.