Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
grdAyush committed Mar 16, 2024
0 parents commit 79ca5be
Show file tree
Hide file tree
Showing 192 changed files with 14,018 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.env
node_modules
.vscode
package-lock.json
database.yml
discord-invite.yml
1 change: 1 addition & 0 deletions .xata/version/compatibility.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"@xata.io/cli":{"latest":"0.15.10","compatibility":[{"range":">=0.0.0"}]},"@xata.io/client":{"latest":"0.29.3","compatibility":[{"range":">=0.0.0"}]}}
8 changes: 8 additions & 0 deletions .xatarc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"databaseURL": "",
"codegen": {
"output": "src/handlers/xata.js",
"moduleType": "cjs"
}
}

65 changes: 65 additions & 0 deletions Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
<h1 align="center">
<br>
<a href="https://github.com/grdAyush"><img src="https://images-ext-1.discordapp.net/external/HK8zdZiIGkX4-ow3rVcQtOojBx5znds4SxxHZtE4lsA/%3Fsize%3D1024/https/cdn.discordapp.com/avatars/1180001367801208913/c5a2b25171527fd7beb1bc4fa06f5b11.png?format=webp&quality=lossless&width=701&height=701" height="200" alt="Discord.js v14 Bot"></a>
<br>
Aayu Bot
<br>
</h1>

<p align="center">Music, Playlist, Leveling, Invite Sytem, Autoname Changer and More</p>

<br>

<p align="center">
<a href="#-resource-links">Resource Links</a>
<a href="#-prerequisites">Prerequisites</a>
<a href="#-getting-started">Getting Started</a>
<a href="#-features">Features</a>

<br>

## 🔗 Resource Links

- 🤖 Demo Bot: [Invite Here](https://discord.com/api/oauth2/authorize?client_id=1180001367801208913&permissions=8&scope=applications.commands%20bot)
- 🤝 Support Server: [Join Here](https://discord.gg/GsPYuqdYZC)


## 📦 Prerequisites

- [Node.js](https://nodejs.org/en/) v20.11.0 or higher
- [Git](https://git-scm.com/downloads)
- [MongoDB](https://www.mongodb.com)
- [XataDB](https://xata.io)

## 🚀 Getting Started

- Open the terminal and run the following commands

```
git clone https://github.com/grdAyush/aayu.git
cd aayu
npm install
```

- Wait for all the dependencies to be installed
- Rename `.env.example` to `.env` and fill the values
- Optionally edit `src/config.js`
- Setup Xata DB Guide [here](docs/database.md)
- Type `npm run start` to start the bot



<br>

<h1 align="center"> ✨ Features ✨ </h1>

- 🎵 Music (Using Riffy )
- 📜 Playlist
- 🎮 Leveling
- 📩 Invite System
- 📝 Autoname Changer

<br>
36 changes: 36 additions & 0 deletions docs/database.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<h1> Database Installation Guide</h1>

- Create an Account on [XataDB](https://xata.io)
- Create a new Database According To Your Region

- After Creating Database Follow These Steps:

1. Install Xata CLI on Your Device
```bash
npm install -g @xata.io/cli
```
2. Login to Your Account
```bash
xata auth login
```

3. Copy the end Point of the database by clicking on database it will look like this

```bash
https://xxxx-s-workspace-qurnbs.your-region.sh/db/DB-name:branch-name
```
4. Remove The Branch Name and paste the end point in `.xatarc` and `.env` file. Your End Point should be look like this
```bash
https://xxxx-s-workspace-qurnbs.your-region.sh/db/DB-name
```

5. Go to Your Account Settings And Create a New API Key and Paste it in `.env `file.

6. Now Upload Schemas Into Your Database By This Command
```bash
xata schema upload schema.json

xata codegen
```


23 changes: 23 additions & 0 deletions example.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
EMBED_COLOR=#FFFFFF
DEV_ID=
OWNER_ID=

#Important
CLIENT_TOKEN=
MONGODB_URI=
CLIENT_ID=

#Xata
XATA_DATABASE=Your Database Enpoint
XATA_BRANCH=main
XATA_API_KEY=

#Nodes
host=
port=
password=
secure=

#Spotify
SPOTIFY_CLIENT_ID=
SPOTIFY_CLIENT_SECRET=
39 changes: 39 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"name": "aayu",
"version": "3.0.0",
"description": "Aayu Bot",
"main": "src/index.js",
"scripts": {
"test": "echo \"Wow is this a test?\" && exit 1",
"start": "node ."
},
"keywords": [],
"author": "Ayush",
"license": "GPL-3.0",
"dependencies": {
"@napi-rs/canvas": "^0.1.44",
"@xata.io/client": "^0.27.0",
"axios": "^1.6.4",
"chalk": "^2.4.2",
"chartjs-node-canvas": "^4.1.6",
"chartjs-plugin-gradient": "^0.5.1",
"common-tags": "^1.8.2",
"discord-invite": "github:grdAyush/discord-invite",
"discord.js": "^14.14.1",
"dotenv": "^16.3.1",
"genius-lyrics": "^4.4.6",
"jsdom": "22.1.0",
"moment": "^2.30.1",
"moment-duration-format": "^2.3.2",
"mongoose": "^7.3.1",
"ms": "^2.1.3",
"musicard-bun": "^1.6.8",
"node-fetch": "^2.7.0",
"node-os-utils": "^1.3.7",
"os-utils": "^0.0.14",
"riffy": "^1.0.3",
"riffy-spotify": "^1.0.0",
"simply-djs": "^4.1.1",
"undici": "^5.28.2"
}
}
100 changes: 100 additions & 0 deletions schemas.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
{ "tables": [
{
"name": "GuildSchema",
"columns": [
{ "name": "prefix", "type": "string" },
{ "name": "TwentyFourSeven", "type": "bool" },
{ "name": "Autoplay", "type": "bool" }
]
},
{
"name": "Invites",
"columns": [
{ "name": "Guild", "type": "string" },
{ "name": "Inviter", "type": "string" },
{ "name": "Invites", "type": "int", "defaultValue": "0" },
{ "name": "Left", "type": "int", "defaultValue": "0" },
{ "name": "Rejoin", "type": "int", "defaultValue": "0" },
{ "name": "Fake", "type": "int", "defaultValue": "0" },
{ "name": "Joins", "type": "int", "defaultValue": "0" }
]
},
{
"name": "InviteBy",
"columns": [
{ "name": "Guild", "type": "string" },
{ "name": "Inviter", "type": "string" },
{ "name": "Member", "type": "string" }
]
},
{
"name": "Autoname",
"columns": [
{ "name": "Toggle", "type": "bool", "defaultValue": "false" },
{ "name": "Name", "type": "string" }
]
},
{
"name": "Playlist",
"columns": [
{ "name": "name", "type": "string" },
{ "name": "created", "type": "int" },
{ "name": "tracks", "type": "multiple" },
{ "name": "Private", "type": "bool" },
{ "name": "owner", "type": "string" }
]
},
{
"name": "Level",
"columns": [
{ "name": "Toggle", "type": "bool" },
{ "name": "AnnounceChannel", "type": "string" },
{ "name": "LevelRewards", "type": "json" },
{ "name": "XPTimeout", "type": "int", "defaultValue": "10000" },
{ "name": "XPRate", "type": "int", "defaultValue": "1" },
{ "name": "IgnoreXP", "type": "multiple" },
{ "name": "ExtraXP", "type": "multiple" },
{ "name": "Announcements", "type": "bool" },
{ "name": "Uplimit", "type": "int", "defaultValue": "20" },
{ "name": "LowLimit", "type": "int", "defaultValue": "5" },
{ "name": "AnnounceEmbedThumnail", "type": "string", "notNull": true, "defaultValue": "None" },
{ "name": "AnnounceEmbedToggle", "type": "bool", "defaultValue": "true" },
{ "name": "AnnounceEmbed", "type": "json", "defaultValue": "{\n \"type\": \"rich\",\n \"color\": 16777215,\n \"title\": \"Some One Got New Level YaY!\",\n \"description\": \"Hello {user} You Have Been Now Level Up To {level}!\",\n \"content_scan_version\": 0\n }" },
{ "name": "AnnounceMessage", "type": "string", "defaultValue": "{user}" }
]
},
{
"name": "UserXP",
"columns": [
{ "name": "Guild", "type": "string", "defaultValue": "0" },
{ "name": "User", "type": "string", "defaultValue": "0" },
{ "name": "XP", "type": "int", "defaultValue": "0" },
{ "name": "Level", "type": "int", "defaultValue": "0" },
{ "name": "LastXp", "type": "int" }
]
},
{
"name": "Track",
"columns": [
{ "name": "Guild", "type": "string" },
{ "name": "Track", "type": "string" },
{ "name": "Message", "type": "string" },
{ "name": "Channel", "type": "string" }
]
},
{
"name": "Player",
"columns": [
{ "name": "Voice", "type": "string" },
{ "name": "Text", "type": "text" },
{ "name": "Message", "type": "string" }
]
},
{
"name": "NoPrefix",
"columns": [
{ "name": "Users", "type": "multiple" }
]
}
]
}
Loading

0 comments on commit 79ca5be

Please sign in to comment.