-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit a74771a
Showing
85 changed files
with
6,727 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Yout Bot Token | ||
TOKEN= | ||
|
||
# Your Bot ID | ||
BOT_ID= | ||
|
||
# GLOBAL PREFIX | ||
PREFIX= | ||
|
||
# OWNERS ID | ||
OWNER_ID= | ||
|
||
# MONGO URL | ||
MONGO_CONNECTION= | ||
|
||
# Webhooks Links | ||
ERROR_LOGS= | ||
JOIN_LEAVE_LOGS= | ||
|
||
|
||
# SUPPORT SERVER | ||
SUPPORT_SERVER= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
## Problem description | ||
|
||
Clearly and concisely describe the problem. Include any relevant context or information. | ||
|
||
## Node.js version | ||
|
||
Specify the version of Node.js that you are using. | ||
|
||
## Operating system | ||
|
||
Specify the operating system (e.g. Windows, macOS, Linux) that you are using. | ||
|
||
## Bot version | ||
|
||
Specify the version of the bot that you are using. | ||
|
||
## Steps to reproduce | ||
|
||
1. | ||
2. | ||
3. | ||
|
||
## Expected behavior | ||
|
||
Describe how the code or function in question should work. | ||
|
||
## Current behavior | ||
|
||
Describe how the code or function is currently working. Include any error or error message that appears. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
# Logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
lerna-debug.log* | ||
|
||
# Diagnostic reports (https://nodejs.org/api/report.html) | ||
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
*.pid.lock | ||
|
||
# Directory for instrumented libs generated by jscoverage/JSCover | ||
lib-cov | ||
|
||
# Coverage directory used by tools like istanbul | ||
coverage | ||
*.lcov | ||
|
||
# nyc test coverage | ||
.nyc_output | ||
|
||
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) | ||
.grunt | ||
|
||
# Bower dependency directory (https://bower.io/) | ||
bower_components | ||
|
||
# node-waf configuration | ||
.lock-wscript | ||
|
||
# Compiled binary addons (https://nodejs.org/api/addons.html) | ||
build/Release | ||
|
||
# Dependency directories | ||
node_modules/ | ||
jspm_packages/ | ||
|
||
# TypeScript v1 declaration files | ||
typings/ | ||
|
||
# TypeScript cache | ||
*.tsbuildinfo | ||
|
||
# Optional npm cache directory | ||
.npm | ||
|
||
# Optional eslint cache | ||
.eslintcache | ||
|
||
# Microbundle cache | ||
.rpt2_cache/ | ||
.rts2_cache_cjs/ | ||
.rts2_cache_es/ | ||
.rts2_cache_umd/ | ||
|
||
# Optional REPL history | ||
.node_repl_history | ||
|
||
# Output of 'npm pack' | ||
*.tgz | ||
|
||
# Yarn Integrity file | ||
.yarn-integrity | ||
|
||
# dotenv environment variables file | ||
.env | ||
.env.test | ||
|
||
# parcel-bundler cache (https://parceljs.org/) | ||
.cache | ||
|
||
# Next.js build output | ||
.next | ||
|
||
# Nuxt.js build / generate output | ||
.nuxt | ||
dist | ||
|
||
# Gatsby files | ||
.cache/ | ||
# Comment in the public line in if your project uses Gatsby and *not* Next.js | ||
# https://nextjs.org/blog/next-9-1#public-directory-support | ||
# public | ||
|
||
# vuepress build output | ||
.vuepress/dist | ||
|
||
# Serverless directories | ||
.serverless/ | ||
|
||
# FuseBox cache | ||
.fusebox/ | ||
|
||
# DynamoDB Local files | ||
.dynamodb/ | ||
|
||
# TernJS port file | ||
.tern-port | ||
|
||
.package-lock.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2023 NoBody. | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# CUCHUS MUSIC | DISCORD MUSIC BOT | ||
|
||
[![GitHub package.json version](https://img.shields.io/github/package-json/v/NoBody-UU/cuchus-music.svg)](https://github.com/NoBody-UU/cuchus-music) | ||
[![Discord](https://img.shields.io/discord/644672989014523940.svg)](https://discord.gg/MqNKpdrGjw) | ||
[![npm](https://img.shields.io/npm/v/npm.svg)](https://www.npmjs.com/) | ||
[![node](https://img.shields.io/node/v/discord.js.svg)](https://nodejs.org/) | ||
|
||
Welcome to Cuchus Music, the Discord music bot that allows you to play songs from Spotify, YouTube, and SoundCloud directly on your server! With our bot, you can search and play songs by title or artist, and much more. Start enjoying the music you love now with Cuchus Music! | ||
|
||
## Installation | ||
|
||
1. Clone the repository. To clone the repository, use Git and run the command `git clone https://github.com/NoBody-UU/cuchus-music.git`. | ||
2. Run the command `cd cuchus-music`. | ||
3. Install the necessary dependencies by running the command `npm install`. | ||
4. Rename the file `env.example` to `.env`. | ||
5. Assign values to the environment variables in the `.env` file. **Attention! These data must be kept secret and must not be shared with anyone.** | ||
6. Run the bot by running the command `node .` or running the file `start.bat`. | ||
|
||
## Documentation | ||
|
||
For more detailed information about the Cuchus Music Discord bot and its features, see the documentation at [DOCUMENTATION](https://doc-cuchus-music.nobody-dev.me). | ||
|
||
## Contribution | ||
|
||
We welcome any contributions to Cuchus Music Discord Bot, whether it be reporting bugs, proposing new features, or fixing issues. To contribute, please follow these steps: | ||
|
||
1. Fork the repository and create a new branch for your changes. | ||
2. Make your changes and commit them to your branch. | ||
3. Open a pull request and describe the changes you have made. | ||
4. If your changes are in line with the project goals and meet our quality standards, they will be merged into the main branch. | ||
|
||
Please note that all contributors are expected to follow our code of conduct. By contributing to this project, you agree to abide by its terms. | ||
|
||
## License | ||
|
||
This project is licensed under the MIT license. For more details, see the [LICENSE](LICENSE) file. | ||
|
||
<br> | ||
|
||
### EXTRA-INFO | ||
|
||
If you want to test the bot before deploying it to your server, you can invite the test version using this link: [invite link](https://discord.com/api/oauth2/authorize?client_id=1033487955509137570&permissions=8&scope=bot%20applications.commands). | ||
If you have any questions or queries, don't hesitate to contact me on Discord: `NoBody#9666` or in my [Discord server](). | ||
|
||
You can also invite my multi-functional bot(**CUCHUS**) using this link: [CLICK HERE](). | ||
|
||
I hope you enjoy using the bot and feel free to reach out to me if you need any help or have any suggestions. | ||
|
||
|
||
| ¡Please leave a ⭐ to help the project| | ||
|----------------------------------------------| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
@echo off | ||
title Cuchus Music By: NoBody | ||
|
||
:Reconnected | ||
|
||
node index.js | ||
|
||
goto Reconnected |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
const { Client, Collection, GatewayIntentBits, WebhookClient } = require("discord.js"); | ||
const { DisTube } = require('distube'); | ||
const { SoundCloudPlugin } = require('@distube/soundcloud'); | ||
const { SpotifyPlugin } = require('@distube/spotify'); | ||
const { YtDlpPlugin } = require("@distube/yt-dlp"); | ||
const { I18n } = require("@hammerhq/localization"); | ||
const Logger = require("./src/helpers/Logger"); | ||
const { initializeMongoose } = require("./src/Database/mongoose"); | ||
const { LINKS, TOKEN } = require("./settings/config.js"); | ||
|
||
class MainClient extends Client { | ||
constructor() { | ||
super({ | ||
shards: "auto", | ||
intents: [ | ||
GatewayIntentBits.Guilds, | ||
GatewayIntentBits.GuildMembers, | ||
GatewayIntentBits.GuildMessages, | ||
GatewayIntentBits.GuildVoiceStates, | ||
GatewayIntentBits.MessageContent, | ||
], | ||
allowedMentions: { | ||
parse: ["roles", "users", "everyone"], | ||
repliedUser: false | ||
}, | ||
}); | ||
|
||
// find unhandled Rejections and Uncaught Exception | ||
process.on("unhandledRejection", (err) => client.logger.error(`Unhandled exception`, err)); | ||
process.on("uncaughtException", (err) => client.logger.error(`Uncaught Exception`, err)); | ||
|
||
this.config = require('./settings/config.js'); | ||
this.prefix = this.config.PREFIX; | ||
this.owner = this.config.OWNER_ID; | ||
// Language is future feature... | ||
this.i18n = new I18n(this.config.LANGUAGE); | ||
this.logger = Logger; | ||
this.joinLeaveWebhook = LINKS.JOIN_LEAVE_LOGS ? new WebhookClient({ url: LINKS.JOIN_LEAVE_LOGS }) : undefined; | ||
// initialize the database | ||
initializeMongoose(); | ||
|
||
const client = this; | ||
|
||
this.distube = new DisTube(client, { | ||
searchSongs: 0, /// SET TO 5 FOR ENABLE SEARCH MODE! | ||
searchCooldown: 30, | ||
leaveOnEmpty: true, | ||
emptyCooldown: 60, | ||
leaveOnFinish: false, | ||
leaveOnStop: true, | ||
plugins: [ | ||
new SoundCloudPlugin(), | ||
new SpotifyPlugin({ | ||
emitEventsAfterFetching: true | ||
}), | ||
new YtDlpPlugin()], | ||
}); | ||
|
||
["aliases", "commands"].forEach(x => client[x] = new Collection()); | ||
["loadCommands", "loadEvents", "loadDistube"].forEach(x => require(`./src/handlers/${x}`)(client)); | ||
|
||
} | ||
|
||
|
||
|
||
connect() { | ||
return super.login(TOKEN); | ||
|
||
}; | ||
}; | ||
module.exports = MainClient; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
|
||
const MainClient = require("./bot"); | ||
const client = new MainClient(); | ||
|
||
client.connect() | ||
|
||
module.exports = client; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# DISCORD MUSIC BOT | Languages | ||
|
||
### Coming soon... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Logs files will be created here. |
Oops, something went wrong.