Skip to content

Multi-purpose Discord bot that is easy to self host & has a built in web-panel.

License

Notifications You must be signed in to change notification settings

analog-org/analog

Repository files navigation

Analog

This is a Discord bot with a dashboard built in NextJS, TailwindCSS, Discord.JS, Next-Auth, and Prisma.

⚠️ Warning, this is in pre aplpha alpha, we don't even have any commands for the bot Stay tuned for updates

npm npm npm npm GitHub top language GitHub commit activity GitHub issues
Discord

Getting Started

Initial Setup

git clone https://github.com/analog-org/analog.git
cd analog
npm i

ENV Variables

  • Copy .env.example and paste it in the main directory
  • Rename it to just .env
  • Fill in the values for the environment variables
  1. Create an APP on Discord Developer Portal
  2. Create a bot user and copy the token
  3. Put the token you copied in the DISCORD_TOKEN variable in the .env file
  4. To get the DISCORD_CLIENT_ID and NEXT_PUBLIC_DISCORD_CLIENT_ID values, go to the OAuth2 tab in your application and copy the Client ID value image
  5. To get the DISCORD_CLIENT_SECRET value, go to the OAuth2 tab in your application and copy the Client Secret value (or reset the secret and copy the new one) image
  6. For NEXTAUTH_SECRET you can generate a random 32 character string by doing openssl rand -base64 32 or at generate.plus
  7. NEXTAUTH_URL is the URL of your website (e.g. http://localhost:3000, https://analog.org, https://panel.bossdaily.me)

Your .env file should endup looking like this

DISCORD_CLIENT_ID="61266727282091783"
DISCORD_TOKEN="OTI2Nnrjh9ia03ndNTIw.GjSdq1.bh2983-34yhtg9wasn9iy34ifgkaopneianwh"
NEXT_PUBLIC_DISCORD_CLIENT_ID="61266727282091783"
DISCORD_CLIENT_SECRET="uqerhgeas2HxewZQfdggK9gl-KLcnbgja"
NEXTAUTH_URL="http://localhost:3000"
NEXTAUTH_SECRET="34gaw9jmig04jma0hi-mwaehawh-KLcnbgja"

:::tip ENV Variables are global You can use any ENV variables you add here anywhere in the project :::

Starting The Bot

To start the bot & the dashboard you have to be in the root directory of the project and run the following command

npm start

Developer mode

You can do

npm run dev

To get into developer mode, meaning the bot or the dashboard restart & recompile on code changes

About

Multi-purpose Discord bot that is easy to self host & has a built in web-panel.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published