GithubHelp home page GithubHelp logo

stockfish-wiki-bot's Introduction

stockfish-wiki-bot

Custom bot for the stockfish discord,
made to easily link to wiki entries on discord.

Development

git clone https://github.com/Disservin/stockfish-wiki-bot.git
cd stockfish-wiki-bot
git submodule update --init
npm install

Create a new application for discord here https://discord.com/developers/applications.

Fill out the missing environment variables

DISCORD_TOKEN=""
CLIENT_ID=""
GUILD_ID=""
GITHUB_API_TOKEN=""

DISCORD_TOKEN

Navigate to https://discord.com/developers/applications -> Bot -> Token.

CLIENT_ID

Navigate to https://discord.com/developers/applications -> OAuth2 -> General and copy the CLIENT_ID.

GUILD_ID

Enable Developer on Discord and right click on the server and copy the Server Id.

GITHUB_API_TOKEN

Generate your token here https://github.com/settings/tokens?type=beta

Refresh commands run node deploy-commands.js

Start bot node index.js

Server Setup

The server uses pm2 to manage the bot and runs this script every 12hrs.

git -C ../stockfish-wiki-bot/Stockfish.wiki checkout master
git -C ../stockfish-wiki-bot/Stockfish.wiki pull
/usr/bin/node /usr/bin/pm2 restart all

and has these two cronjobs

0 */12 * * * /home/ubuntu/scripts/pull-bot.sh
0 */12 * * * /home/ubuntu/scripts/pull-wiki.sh

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.