Skip to content

0-don/coding.global-bot

Repository files navigation

Logo

coding.global Discord Bot.

The official bot for the discord.gg/coding Discord Server.
» Explore the docs
· Report Bug · Request Feature

Setup

Prerequisites

  1. Discord Bot Token - Follow this YouTube tutorial to create a Discord bot and get your token
  2. Database - Set up a PostgreSQL database using Neon.tech (recommended) or your preferred provider

Database Setup with Neon

  1. Create a Neon Account

    • Go to Neon.tech and sign up for a free account
    • Create a new project and give it a name (e.g., "coding-global-bot")
  2. Get Database Connection String

    • In your Neon dashboard, go to your project
    • Navigate to the "Connection Details" section
    • Copy the connection string (it looks like: postgresql://username:password@host/database?sslmode=require)
  3. Configure Environment Variables Create a .env file from the .env.example template and fill in the required variables:

  4. Install Dependencies & Run Prisma

    npm install
    npm run prisma
    npm run dev

    run /verify-all-users to verify all users in the server and the db.

Slash Commands


  • /verify-all-users

    • Description: Important for the first run, this command verifies all users in the server.
  • /delete-messages

    • Description: Deletes messages from a channel.
    • Options:
      • amount: Delete message history.
  • /me

    • Description: Get your stats.
  • /members

    • Description: Member flow and count of the past.
  • /top

    • Description: Get top user stats.
  • /translate

    • Description: Translate text to English.
    • Options:
      • text: The text to translate.
  • /troll-move-user

    • Description: Troll move user around empty voice channels.
    • Options:
      • user: Select either user which should be moved.
  • /user

    • Description: Get stats from a specific user.
    • Options:
      • user: Select the user whose stats should be shown.

restore db

docker exec -i coding-global-db pg_restore -U postgres -c -d coding-global-db -v < ~/coding-global-db-latest.sql.gz

backup raw db / restore raw db

docker exec -ti coding-global-db pg_dump -U postgres coding-global-db > coding-global-db.sql

cat coding-global-db.sql | docker exec -i coding-global-db psql -U postgres -d coding-global-db

Releases

No releases published

Packages

No packages published

Contributors 8