This is the code for a simple discord bot.
-
Install node if you haven't already.
-
Clone this repository and pull the project dependencies:
# in the root directory
npm install
- Create a new
app-config.yaml
file in the root directory to hold the bot's credentials.
# creds.yaml
commandPrefix: <a command prefix other than "!" e.g. "$" to allow you to run your dev bot with different commands>
discordToken: <the token>
steamApiKey: <the key>
battlenetClientKey: <the key>
battlenetClientSecret: <the secret>
dynamodbTable: <DynamoDB table name>
dynamodbRegion: <DynamoDB table region>
discordToken
- The Discord bot ClientKey. Get it by setting up a Discord application and adding a bot.
steamApiKey
- Steam API Key; get it by setting up an account and registering for an API key in the SteamCommunity.
battlenetClientKey
andbattlenetClientSecret
- BattleNet API credentials. Get them by setting up a BattleNet dev account.
dynamodbTable
anddynamodbRegion
- The database used by Rhobot. To call against DynamoDB it is expected that AWS credentials will be made available to the process (e.g. by previousy exporting environment variables or using an EC2 instance profile)
- To run the server locally, export AWS API credentials and point node at the
src
directory:
export AWS_ACCESS_KEY_ID=<your AWS public key>
export AWS_SECRET_ACCESS_KEY=<your AWS secret key>
node src/