Skip to content
ErdbeerbaerLP edited this page May 26, 2021 · 3 revisions

Setup instructions

Discord-Side:

1. Create your bot.

Open https://discordapp.com/developers/applications/ and click on "New Application".

Name it as you want and give it an App icon (this will be the default avatar image of the Bot). Then on the left side, click on "Bot" and then on the right, click "Add Bot".

Temporary Workaround:

To fix the bot not loading completely, enable server memebers intent on this page! This will only be required till next update

2. Add the bot to your discord server

Copy your client ID from the "General Information" tab and enter it on this page, then click the generated link below and select the server you want the bot in (you need Administrator permissions to add a bot!). The bot itself requires permissions to modify webhooks, send and read messages, manage roles and manage channels.

Server Side:

Hosting yourself

(you need java on your server)

  1. Execute the jar file
  2. Edit the config to add the discord bot token (can be found on the discord developers page) and the default channel ID (can be get by enabling developer mode in the discord app and right clicking the target channel, then click 'Copy ID')
  3. Add curseforge projects to the config file
    The allowed formats are:
    <project id> and <project id>;;<target channel id>
    Example:
ids = [
    # Discord Integration
    "324952",
    # DiscordRichPresence
    "300569",
    # Advanced Rocketry (into Discord channel with ID '455009606041600000')
    "236542;;455009606041600000"
]
  1. (Optional) Edit the other config options as you want
  2. Execute the jar again, bot should be online and and an caches file should be generated

Using Heroku

Using Heroku is a little bit more complicated, as the caches file won't get saved at all.

Reqirements: An github account, an heroku account with an connected payment method for 24/7 operation (if only running one bot, they won't charge you)

  1. Setup deployment for heroku (https://devcenter.heroku.com/articles/git)
  2. Drop the jar file into the local git repository
  3. Create an file (without extension) called 'Procfile' with the contents:
    worker: java $JAVA_OPTS -jar Curseforge-Bot-<version>.jar $JAR_OPTS -token $BOT_TOKEN -github $GITHUB_TOKEN -debug
    (replace '' with the actual version of the jar file)
  4. Execute the jar once (on your local computer)
  5. Edit the newly created bot.conf file
    You need to set the BotToken to "args", the githubToken to "", an github repo name of your choice (or leave default) and the project IDs just like in Hosting yourself #3
  6. Create an github access token with full "Repo" access (https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token)
  7. In the Heroku dashboard, go to Settings, Config vars and click on Reveal Config Vars
    Now enter BOT_TOKEN in the first field and the discord bot token (from the discord developers website) into the second one, click "Add"
    Now on the next line enter GITHUB_TOKEN and your github access token, click add again.
  8. Deploy to heroku
  9. Go to the resources tab in the Heroku dashboard and enable "worker"
    Bot should be running now