Installation

Basic Installation

At this point, you should have the following:

  1. Your terminal open to the hosting environment of your choice.
  2. Git, Node.js, and npm installed in this environment.

If you're missing one of those requirements, head back to the Environment Setup page. Also, if you need help at any point in this guide, please don't hesitate to join our Discord server!

Download Qbot

Run this command to download the latest version of Qbot from Github:

git clone https://github.com/LengoLabs/qbot.git

Next, navigate to the directory that Git just created:

cd qbot

Install npm dependencies

Run this command to install Qbot's dependency modules:

npm install -D

Initialize the database

Generate the Prisma database ORM and initialize your SQLite database with this command:

npx prisma migrate dev --schema ./src/database/schema.prisma --name init

Enter y if prompted to allow the installation of prisma. Data will be stored at the qbot/qbotdata.db path.

Creating your Discord Bot

  1. Head to the Discord Developer Portal and login with your account.
  2. Create an application and set its username to whatever you want. Screenshot
  3. Go to the Bot page in the application's settings. Screenshot
  4. Generate a token for the bot and copy it to your clipboard. Screenshot Screenshot
  5. Run this command, replacing [value] with the token you copied:
echo "DISCORD_TOKEN=[value]" >> .env
  1. Scroll down to Privileged Gateway Intents, and enable the Server Members and Message Content intents. Don't forget to save your changes. Screenshot

Tokens should NEVER be shared

With your bot token in the wrong hands, someone could gain full access to your bot account and destroy servers or break Discord TOS. Tokens can also lead to getting partial access to the owner's account.

We will never ask you to send us your token. The code above saves your token in the VPS that only you should have access to, assuming you chose a trusted hosting platform and set it up correctly.

Creating your Roblox Bot account

Complete these steps on Chrome or Firefox if possible:

  1. Open an incognito/private window in your browser.
  2. Create an account for your bot at roblox.com.
  3. Join your group with the bot.
  4. Right click anywhere on the website and select Inspect or Inspect Element. Screenshot
  5. Go to the Application tab of dev tools.
  6. Expand Cookies in the sidebar and select https://www.roblox.com.
  7. Find the cookie named .ROBLOSECURITY.
  8. Copy everything in its value to your clipboard.
  9. Run this command, replacing [value] with the cookie value you copied:
echo "ROBLOX_COOKIE=[value]" >> .env
  1. Close the incognito window without logging out!
  2. If applicable, accept your bot's join request for the group.

Cookies should NEVER be shared

With your bot cookie in the wrong hands, someone could gain full access to your bot account and destroy groups or break Roblox TOS.

We will never ask you to send us your cookie. The code above saves your cookie in the VPS that only you should have access to, assuming you chose a trusted hosting platform and set it up correctly.

Visual guide to copying the cookie once in dev tools:

Screenshot

Set the Group ID

  1. Go to your group's page and copy the numbers after groups/ in the URL. Screenshot
  2. Open your configuration file with nano src/config.ts.
  3. Search for the groupId field with Ctrl+W, then type groupId, then press enter.
  4. Replace the 0 placeholder on that line with the copied numbers.
  5. Press Ctrl+X, then y, then press enter.

Start the bot process

Run the command below to get your bot running in the background:

pm2 start npm --name "qbot" -- start

Then, run this command to save your PM2 configuration if the server restarts:

pm2 save

You're all done!

🎉 Congrats! Time to start customizing your bot! Check out all of the options under Customization in the sidebar, or start with something basic like permissions.

You can also begin by running /help to see a list of commands!

Previous
Environment setup