Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
DARSHGOYALMAGMA committed Oct 8, 2022
0 parents commit 6d0e7ca
Show file tree
Hide file tree
Showing 7,277 changed files with 672,397 additions and 0 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
20 changes: 20 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Bot Token [Required]
BOT_TOKEN=

# Mongo Database Connection String [Required]
MONGO_CONNECTION=

# Webhooks [Optional]
ERROR_LOGS=
JOIN_LEAVE_LOGS=

# Dashboard [Required for dashboard]
BOT_SECRET=
SESSION_PASSWORD=

# API Keys [Required for Weather Command]
WEATHERSTACK_KEY=

# SPOTFIY [Required for Spotify Support]
SPOTIFY_CLIENT_ID=
SPOTIFY_CLIENT_SECRET=
20 changes: 20 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"env": {
"node": true,
"commonjs": true,
"es2021": true
},
"extends": "eslint:recommended",
"parserOptions": {
"ecmaVersion": 12
},
"plugins": ["jsdoc"],
"rules": {
"no-unused-vars": ["error", { "args": "none" }],
"jsdoc/no-undefined-types": 1,
"no-cond-assign": 0
},
"globals": {
"__appRoot": "readonly"
}
}
8 changes: 8 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Files that shouldn't be exported
.gitattributes export-ignore
.gitignore export-ignore
.vscode export-ignore
README.md export-ignore

# Line endings
* text=auto
4 changes: 4 additions & 0 deletions .gitbook.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
root: ./docs/
structure:
readme: ../README.md
summary: SUMMARY.md
27 changes: 27 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug-unverified
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**If possible**
- NodeJS version:
- Bot version:

**Additional context**
Add any other context about the problem here.
17 changes: 17 additions & 0 deletions .github/ISSUE_TEMPLATE/command-request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
name: Command Request
about: Suggest a command for this project
title: ''
labels: cmd-request
assignees: ''

---

**Is your command request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe what command you'd like**
A clear and concise description of what you want to happen.

**Additional context**
Add any other context or screenshots about the feature request here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.vscode/
node_modules/
logs/*
.env
10 changes: 10 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"trailingComma": "es5",
"tabWidth": 2,
"useTabs": false,
"semi": true,
"singleQuote": false,
"printWidth": 120,
"bracketSpacing": true,
"arrowParens": "always"
}
2 changes: 2 additions & 0 deletions .replit
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
language = "nodejs"
run = "node_modules/.bin/node bot.js"
72 changes: 72 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# 🤖 About Me

![Strange Bot](https://i.imgur.com/nFrS5wC.png)

> An awesome multipurpose discord bot built using [discord.js v13](https://discord.js.org) with support for slash commands and context menus
> Demo Bot: [Invite Here](https://discord.com/oauth2/authorize?client\_id=752922609733337190\&permissions=397602323830\&scope=bot%20applications.commands)
>
> Code Credit Support Server: [Join Here](https://discord.gg/fE75UShbqB)
> Arbotix Codez Support Server: [Join Here](https://discord.gg/7wmb5x7qp4)
>
> Documentation URL: [Visit Here](https://docs.strangebot.xyz)
### Prerequisites

* [Node.js](https://nodejs.org/en/) v16.6.0 or higher
* [Git](https://git-scm.com/downloads)
* [MongoDB](https://www.mongodb.com)

### Getting Started

* Open the terminal and run the following commands

```
git clone https://github.com/Hjgaming/ALL-IN-ONE-BOT-WITH-DASHBOARD.git
cd discord-js-bot
npm install
```

* Wait for all the dependencies to be installed
* Rename `.env.example` to `.env` and fill the values
* Optionally edit `config.js`
* Type `npm run start` to start the bot

If you need any additional help, make sure to read our guides [here](docs/additional/installation.md)

### Features

Strange is a feature-rich discord bot with new features constantly being updated! Current features include

* **Auto-Moderation**: Power auto-moderation to keep your discord server clean
* **Powerful Moderation with Logging**: Moderate and log every action you take
* **Image Manipulation**: Have fun with various image `filters` and `generators`
* **Economy & XP System**: Engage user interaction with the economy and Levelling system
* **Invite Tracking**: Best invite tracking with configurable invite ranks
* **Ticketing**: Support for creating multiple `ticket` channels
* **Reaction Roles**: Support for creation of multiple custom reaction roles
* **Greeting**: Highly Customizable welcome and farewell embeds

### Categories

Strange has an extensive list of all useful commands (**more than 100**) which are categorized as follows

* **Automod**: `antighostping`, `antiinvites`, `antilinks`, `antiscam`, `maxlines`, `maxmentions`, ...
* **Admin**: `welcome`, `farewell`, `reaction-roles`, ...
* **Economy**: `daily`, `gamble`, `deposit`, `withdraw`, `transfer`, ...
* **Fun**: `cat`, `doc`, `flipcoin`, `fliptext`, ...
* **Information**: `avatar`, `roleinfo`, `channelinfo`, `guildinfo`, `profile`, ...
* **Invites**: `inviter`, `invites`, `invitesimport`, `invitecodes`, ...
* **Moderation**: `warn`, `kick`, `softban`, `ban`, `mute`, `unmute`, ...
* **Music**: `play`, `pause`, `resume`, `stop`, `skip`, `queue`, `np`, ...
* **Social**: `reputation list,` `give reputation,` ...
* **Ticket**: setup, close, log, ...
* **Utility**: `proxies`, `translation`, `weather`, `covid`, ...

A complete list of commands can be found in the [documentation](docs/commands/)

### 🤝 Contributing

* Special thanks to [@Androzz](https://github.com/Androz2091/AtlantaBot) for the [dashboard](https://github.com/Androz2091/AtlantaBot) and his other cool discord bot projects
* Feel free to [Fork](https://github.com/Hjgaming/ALL-IN-ONE-BOT-WITH-DASHBOARD/fork) this repository, create a feature branch and submit a pull request
* You can check all the planned features [here](https://github.com/saiteja-madha/discord-js-bot/projects) or make a request for one at our discord
43 changes: 43 additions & 0 deletions bot.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
require("dotenv").config();
require("module-alias/register");
require("@src/helpers/extenders");

const path = require("path");
const { validateConfig, checkForUpdates } = require("@utils/botUtils");
const { initializeMongoose } = require("@src/database/mongoose");
const { BotClient } = require("@src/structures");

global.__appRoot = path.resolve(__dirname);

// initialize client
const client = new BotClient();
client.loadCommands("src/commands");
client.loadContexts("src/contexts");
client.loadEvents("src/events");

// find unhandled promise rejections
process.on("unhandledRejection", (err) => client.logger.error(`Unhandled exception`, err));

(async () => {
validateConfig();

// initialize the database
await initializeMongoose();

// check for updates
await checkForUpdates();

// start the dashboard
if (client.config.DASHBOARD.enabled) {
client.logger.log("Launching dashboard");
try {
const { launch } = require("@root/dashboard/app");
await launch(client);
} catch (ex) {
client.logger.error("Failed to launch dashboard", ex);
}
}

// start the client
await client.login(process.env.BOT_TOKEN);
})();
103 changes: 103 additions & 0 deletions config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
module.exports = {
OWNER_IDS: [], // Bot owner ID's
PREFIX: "!", // Default prefix for the bot
SUPPORT_SERVER: "", // Your bot support server
PRESENCE: {
ENABLED: true, // Whether or not the bot should update its status
STATUS: "online", // The bot's status [online, idle, dnd, invisible]
TYPE: "WATCHING", // Status type for the bot [PLAYING | LISTENING | WATCHING | COMPETING]
MESSAGE: "{members} members in {servers} servers", // Your bot status message
},
DASHBOARD: {
enabled: false, // enable or disable dashboard
baseURL: "http://localhost:8080", // base url
failureURL: "http://localhost:8080", // failure redirect url
port: "8080", // port to run the bot on
},
INTERACTIONS: {
SLASH: false, // Should the interactions be enabled
CONTEXT: false, // Should contexts be enabled
GLOBAL: false, // Should the interactions be registered globally
TEST_GUILD_ID: "xxxxxxxxxx", // Guild ID where the interactions should be registered. [** Test you commands here first **]
},
XP_SYSTEM: {
COOLDOWN: 5, // Cooldown in seconds between messages
DEFAULT_LVL_UP_MSG: "{m}, You just advanced to **Level {l}**",
},
MISCELLANEOUS: {
DAILY_COINS: 100, // coins to be received by daily command
},
ECONOMY: {
CURRENCY: "₪",
DAILY_COINS: 100, // coins to be received by daily command
MIN_BEG_AMOUNT: 100, // minimum coins to be received when beg command is used
MAX_BEG_AMOUNT: 2500, // maximum coins to be received when beg command is used
},
SUGGESTIONS: {
ENABLED: true, // Should the suggestion system be enabled
EMOJI: {
UP_VOTE: "⬆️",
DOWN_VOTE: "⬇️",
},
DEFAULT_EMBED: "#0099ff",
APPROVED_EMBED: "#00ff00",
DENIED_EMBED: "#ff0000",
},
IMAGE: {
BASE_API: "https://image-api.strangebot.xyz",
},
MUSIC: {
IDLE_TIME: 60, // Time in seconds before the bot disconnects from the voice channel
MAX_SEARCH_RESULTS: 5,
NODES: [
{
host: "ger.lavalink.mitask.tech",
port: 2333,
password: "lvserver",
identifier: "German Link",
retryDelay: 5000,
secure: false,
},
{
host: "usa.lavalink.mitask.tech",
port: 2333,
password: "lvserver",
identifier: "USA Link",
retryDelay: 5000,
secure: false,
},
],
},
/* Bot Embed Colors */
EMBED_COLORS: {
BOT_EMBED: "#068ADD",
TRANSPARENT: "#36393F",
SUCCESS: "#00A56A",
ERROR: "#D61A3C",
WARNING: "#F7E919",
AUTOMOD: "#36393F",
TICKET_CREATE: "#068ADD",
TICKET_CLOSE: "#068ADD",
TIMEOUT_LOG: "#102027",
UNTIMEOUT_LOG: "#4B636E",
KICK_LOG: "#FF7961",
SOFTBAN_LOG: "#AF4448",
BAN_LOG: "#D32F2F",
VMUTE_LOG: "#102027",
VUNMUTE_LOG: "#4B636E",
DEAFEN_LOG: "#102027",
UNDEAFEN_LOG: "#4B636E",
DISCONNECT_LOG: "RANDOM",
MOVE_LOG: "RANDOM",
GIVEAWAYS: "#FF468A",
},
/* Maximum number of keys that can be stored */
CACHE_SIZE: {
GUILDS: 100,
USERS: 10000,
MEMBERS: 10000,
},
MESSAGES: {
API_ERROR: "Unexpected Backend Error! Try again later or contact support server",
},
};
Loading

0 comments on commit 6d0e7ca

Please sign in to comment.