Git Product home page Git Product logo

discord-coc-war-announcer's Introduction

Discord Clash of Clans War Details

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.

Support

Discord Server

Installation

  1. Authorize Announcer on your server.
  2. Have someone that has Manage Channel permissions for the server assign a clan with the command !announce #CLANTAG in the channel you want messages in.
  3. To stop messages in a channel use the command !unannounce #CLANTAG requires the same permission as the !announce command.

Commands

  1. !announce #CLANTAG Assign a clan to announce a channel.
  2. !unannounce #CLANTAG Un-Assign a clan to announce a channel.
  3. !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.
  4. !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.
  5. !playerstats #PLAYERTAG Display player stats for any player tag provided.
  6. !info Display bot information.

Screenshot

Self Hosted Installation

  1. Clone this repository.
  2. Make sure you have Node.JS 6.10.x or newer installed.
  3. Run npm i to install the node modules.
  4. Duplicate and rename config.example.js to config.js.
  5. You will need a api key from Clash of Clans API which should be placed inside config.js under coc->apiKey.
  6. You will need an app from Discord My Apps. You will need the apps Client ID and Bot Token these belong inside config.js under discord->clientId and discord->userToken.
  7. The bot needs you clan tag and a Channel ID to post the announcements in. The clan will need a public war log. To get the Channel ID follow this guide.
  8. Give the bot permissions on your server using this url https://discordapp.com/oauth2/authorize?client_id=__CLIENT_ID__&scope=bot&permissions=134208 and replace __CLIENT_ID__ with your bot's client id
  9. The clan being monitored will need their war log set to public.
  10. Run node index.js to start the bot.
  11. If you need the bot to be kept alive look into PM2

FAQ

  1. Q: Why do the icons not show up on android?
    A: There is currently a bug with the android version of the app that prevents emojis in RichEmbeds from appearing

  2. Q: I saw an attack in game but the bot hasn't said anything in chat about it yet.
    A: Currently the Clash of Clans API only updates every 10 minutes. So it can take anywhere from immediately to 10 minutes for an attack to show up in chat.

  3. Q: How many clans can the Announcer monitor?
    A: The bot should be able handle as many clans as you configure it for.

  4. Q: What does ๐Ÿƒ mean?
    A: A leaf icons stands for a fresh attack. An attack on a base not yet attacked in this war.

  5. Q: What does ๐Ÿ”บ and ๐Ÿ”ป mean?
    A: When a Town Hall 9 attacks a Town Hall 10 it displays a ๐Ÿ”บ. When a Town Hall 10 attacks a Town Hall 9 it displays a ๐Ÿ”ป.

  6. Q: Can I get info about the current/upcoming war from the bot?
    A: Yes just type !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.

  7. 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
  8. Q: Can I use this bot to call bases?
    A: No not at this time.

  9. Q: Will this bot keep detailed statistics of our wars?
    A: No not at this time.

discord-coc-war-announcer's People

Contributors

spanser avatar jime86 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.