Skip to content

Installation Guide

Kotz edited this page Dec 28, 2021 · 5 revisions

If you are an advanced user and would like to compile Akko yourself, head over to the Source Installation Guide.

Prerequisites

  • PostgreSQL
  • A text editor of your choice
  • A Discord bot account
  • Basic computer knowledge (how to navigate through local files, how to find files, how to download and install programs, etc)

Discord Setup

Setting up a bot account

Let's start by creating an account for the bot. If you already have a bot account laying around, you can skip this section.

  • Access the developer portal and click on the "New Application" button in the top right corner.
  • A window will pop up. Give your application a nice name, then click on the "Create" button.
  • You will be thrown into the page for your newly created application. Now you need to click on the bot tab in the left sidebar.

Click on the Bot tab

  • Click on the "Add Bot" on the right corner. This will bring up a confirmation window, click on "Yes, do it!"
  • Scroll down and enable all intents.

Enabling all intents

  • Done. The bot account has been created. Feel free to give it a name and avatar.

Inviting the bot to your server

  • Let's now invite this bot account to your server. Click on OAuth2 in the left sidebar.

Click on the OAuth2 tab

  • On the Scopes table, select bot and applications.commands.

Select these!

  • Under the Scopes table, there is a Bot Permissions table. Select these options (they are the bare minimum for Akko to work):

Select these!

  • Now copy the invite link generated in the Scopes table.

Copy this!

  • Paste this link on your browser and proceed with the invitiation process as normal.
  • Congratulations, you have invited the bot to your server. But notice that it is offline and it doesn't respond to commands. That's because you haven't yet installed the program that is going to give her life.
  • Click on the Bot tab on the left sidebar and leave the page open, we will come back to it later.

Installation

  • Install PostgreSQL.
  • Download Akko from the releases page.
  • Run the bot
    • Windows: double-click the AkkoBot.exe file.
    • Linux: open the terminal in the folder you downloaded the bot and execute ./AkkoBot
      • If you get a permission error, run chmod ugo+x AkkoBot and try again.
    • MacOS: right-click AkkoBot and open with the terminal.
  • A terminal window should open. If this is the first time you're running the bot, Akko should ask you to fill out the credentials file (at Data/Config/credentials.yaml) with the following information:
    • Owner ID
    • Token
    • Database role
    • Database password
  • Let's go through each of them.

Setting up the Owner ID

  • This is the Discord user ID of whoever should have bot ownership (you, preferably). There are two ways you can get it:
    1. The Quick Way
      • In any text channel, mention the user you want to give bot ownership to, then add a backslash at the beginning.
      • Hit Enter to send the message. The number is the user ID.
      • How to ID yourself
    2. Enabling Developer Mode
      • Open your Discord client, go into the Advanced tab in the User Settings (on mobile, this option may show up in the Appearance tab).
      • Enable Developer Mode
      • Enabling Developer Mode
      • Right-click the user you want to give bot ownership to and select the Copy ID option.
      • Copy the ID
      • The ID has now been copied into your clipboard.
  • Replace the 0 under Owner Id with the ID you copied above. The result should look like this:
owner_ids:
- 341420590009417729
  • (Optional) It's possible to add multiple users as owners, like so:
owner_ids:
- 341420590009417729
- 275770891537874945
- 482358916798349323

Setting up the Token

Copy the Token

  • Paste the token on your credentials file. It should look like this:
token: ODkzNTP4NtAxNTI5OTc2ODUy.YVc3ww.1XIVZ_4Azm1yOMCKHDPvJRxxbak
  • Important: DO NOT EVER share your token with ANYONE. The token is basically your bot's password to log into Discord. If it gets leaked, people can use it to access your bot account and do malicious things with it.

Setting up the database credentials

  • After you're done installing PostgreSQL, enter the username (role) and password for the account you created. Akko defaults to the name of your current system user. The role is case-sensitive, so double-check if everything is correct. The final result should look like this:
database:
  role: derpinson
  password: akkobestgurl
  custom_connection_string:
  • The custom connection string is optional and should only be used if your database is not stored locally on your system or if you're having issues connecting to your database. You can check this site for reference strings.

Final Result

  • If you have followed every step on this guide, your credentials.yaml file should look like this:
owner_ids:
- 341420590009417729
token: ODkzNTP4NtAxNTI5OTc2ODUy.YVc3ww.1XIVZ_4Azm1yOMCKHDPvJRxxbak
database:
  role: derpinson
  password: akkobestgurl
  custom_connection_string:
  • Save the file and proceed with the bot startup by pressing Enter on the terminal. If everything is alright, your bot should be online on Discord and responding to commands!

Clone this wiki locally