Browse Source

bot delete

alidexter001 4 năm trước cách đây
mục cha
commit
1a52e8f956
59 tập tin đã thay đổi với 0 bổ sung5004 xóa
  1. 0 109
      bot/.gitignore
  2. 0 2
      bot/.replit
  3. 0 76
      bot/CODE_OF_CONDUCT.md
  4. 0 92
      bot/CONTRIBUTING.md
  5. 0 72
      bot/LICENSE
  6. 0 7
      bot/LICENSE.md
  7. 0 1
      bot/Procfile
  8. 0 15
      bot/api/Middlewares/Auth.js
  9. 0 15
      bot/api/Routes/user.js
  10. 0 80
      bot/api/index.js
  11. 0 70
      bot/api/routes.js
  12. 0 67
      bot/api/socket/index.js
  13. 0 19
      bot/app.json
  14. BIN
      bot/assets/Features.png
  15. BIN
      bot/assets/Screenshot_1.png
  16. BIN
      bot/assets/Screenshot_2.png
  17. BIN
      bot/assets/Screenshot_3.png
  18. BIN
      bot/assets/logo.gif
  19. 0 79
      bot/commands/bassboost.js
  20. 0 51
      bot/commands/clear.js
  21. 0 183
      bot/commands/config.js
  22. 0 82
      bot/commands/grab.js
  23. 0 156
      bot/commands/help.js
  24. 0 55
      bot/commands/invite.js
  25. 0 73
      bot/commands/leave.js
  26. 0 61
      bot/commands/loop.js
  27. 0 62
      bot/commands/loopqueue.js
  28. 0 98
      bot/commands/lyrics.js
  29. 0 89
      bot/commands/nowplaying.js
  30. 0 54
      bot/commands/pause.js
  31. 0 219
      bot/commands/play.js
  32. 0 210
      bot/commands/queue.js
  33. 0 76
      bot/commands/remove.js
  34. 0 53
      bot/commands/resume.js
  35. 0 343
      bot/commands/search.js
  36. 0 59
      bot/commands/seek.js
  37. 0 45
      bot/commands/shuffle.js
  38. 0 46
      bot/commands/skip.js
  39. 0 118
      bot/commands/skipto.js
  40. 0 61
      bot/commands/volume.js
  41. 0 30
      bot/config.js
  42. 0 49
      bot/development.md
  43. 0 3
      bot/events/guildCreate.js
  44. 0 70
      bot/events/message.js
  45. 0 4
      bot/events/raw.js
  46. 0 8
      bot/events/ready.js
  47. 0 6
      bot/index.js
  48. 0 52
      bot/package.json
  49. 0 256
      bot/structures/DiscordMusicBot.js
  50. 0 17
      bot/structures/EpicPlayer.js
  51. 0 28
      bot/structures/Logger.js
  52. 0 19
      bot/util/ProgressBar.js
  53. 0 48
      bot/util/RegisterSlashCommands.js
  54. 0 139
      bot/util/TimeString.js
  55. 0 49
      bot/util/pagination.js
  56. 0 297
      bot/views/dashboard.html
  57. 0 429
      bot/views/index.html
  58. 0 348
      bot/views/server.html
  59. 0 254
      bot/views/servers.html

+ 0 - 109
bot/.gitignore

@@ -1,109 +0,0 @@
-# Logs
-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
-yarn.lock
-
-# 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
-
-# Etc
-dev-config.js
-a.js

+ 0 - 2
bot/.replit

@@ -1,2 +0,0 @@
-run = "node index.js"
-language = "NodeJS"

+ 0 - 76
bot/CODE_OF_CONDUCT.md

@@ -1,76 +0,0 @@
-# Contributor Covenant Code of Conduct
-
-## Our Pledge
-
-In the interest of fostering an open and welcoming environment, we as
-contributors and maintainers pledge to making participation in our project and
-our community a harassment-free experience for everyone, regardless of age, body
-size, disability, ethnicity, sex characteristics, gender identity and expression,
-level of experience, education, socio-economic status, nationality, personal
-appearance, race, religion, or sexual identity and orientation.
-
-## Our Standards
-
-Examples of behavior that contributes to creating a positive environment
-include:
-
-- Using welcoming and inclusive language
-- Being respectful of differing viewpoints and experiences
-- Gracefully accepting constructive criticism
-- Focusing on what is best for the community
-- Showing empathy towards other community members
-
-Examples of unacceptable behavior by participants include:
-
-- The use of sexualized language or imagery and unwelcome sexual attention or
-  advances
-- Trolling, insulting/derogatory comments, and personal or political attacks
-- Public or private harassment
-- Publishing others' private information, such as a physical or electronic
-  address, without explicit permission
-- Other conduct which could reasonably be considered inappropriate in a
-  professional setting
-
-## Our Responsibilities
-
-Project maintainers are responsible for clarifying the standards of acceptable
-behavior and are expected to take appropriate and fair corrective action in
-response to any instances of unacceptable behavior.
-
-Project maintainers have the right and responsibility to remove, edit, or
-reject comments, commits, code, wiki edits, issues, and other contributions
-that are not aligned to this Code of Conduct, or to ban temporarily or
-permanently any contributor for other behaviors that they deem inappropriate,
-threatening, offensive, or harmful.
-
-## Scope
-
-This Code of Conduct applies both within project spaces and in public spaces
-when an individual is representing the project or its community. Examples of
-representing a project or community include using an official project e-mail
-address, posting via an official social media account, or acting as an appointed
-representative at an online or offline event. Representation of a project may be
-further defined and clarified by project maintainers.
-
-## Enforcement
-
-Instances of abusive, harassing, or otherwise unacceptable behavior may be
-reported by contacting the project team at SudhanPlayz@gmail.com. All
-complaints will be reviewed and investigated and will result in a response that
-is deemed necessary and appropriate to the circumstances. The project team is
-obligated to maintain confidentiality with regard to the reporter of an incident.
-Further details of specific enforcement policies may be posted separately.
-
-Project maintainers who do not follow or enforce the Code of Conduct in good
-faith may face temporary or permanent repercussions as determined by other
-members of the project's leadership.
-
-## Attribution
-
-This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
-available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
-
-[homepage]: https://www.contributor-covenant.org
-
-For answers to common questions about this code of conduct, see
-https://www.contributor-covenant.org/faq

+ 0 - 92
bot/CONTRIBUTING.md

@@ -1,92 +0,0 @@
-<h1 align="center">Contributing</h1>
-
-When contributing to this repository, please first discuss the change you wish to make via issue,
-email, or any other method with the owners of this repository before making a change.
-
-Please note we have a code of conduct, please follow it in all your interactions with the project.
-
-## Pull Request Process
-
-1. Ensure any install or build dependencies are removed before the end of the layer when doing a
-   build.
-2. Update the README.md with details of changes to the interface, this includes new environment
-   variables, exposed ports, useful file locations and container parameters.
-3. Increase the version numbers in any examples files and the README.md to the new version that this
-   Pull Request would represent. The versioning scheme we use is [SemVer](http://semver.org/).
-4. You may merge the Pull Request in once you have the sign-off of two other developers, or if you
-   do not have permission to do that, you may request the second reviewer to merge it for you.
-
-## Code of Conduct
-
-### Our Pledge
-
-In the interest of fostering an open and welcoming environment, we as
-contributors and maintainers pledge to making participation in our project and
-our community a harassment-free experience for everyone, regardless of age, body
-size, disability, ethnicity, gender identity and expression, level of experience,
-nationality, personal appearance, race, religion, or sexual identity and
-orientation.
-
-### Our Standards
-
-Examples of behavior that contributes to creating a positive environment
-include:
-
-- Using welcoming and inclusive language
-- Being respectful of differing viewpoints and experiences
-- Gracefully accepting constructive criticism
-- Focusing on what is best for the community
-- Showing empathy towards other community members
-
-Examples of unacceptable behavior by participants include:
-
-- The use of sexualized language or imagery and unwelcome sexual attention or
-  advances
-- Trolling, insulting/derogatory comments, and personal or political attacks
-- Public or private harassment
-- Publishing others' private information, such as a physical or electronic
-  address, without explicit permission
-- Other conduct which could reasonably be considered inappropriate in a
-  professional setting
-
-### Our Responsibilities
-
-Project maintainers are responsible for clarifying the standards of acceptable
-behavior and are expected to take appropriate and fair corrective action in
-response to any instances of unacceptable behavior.
-
-Project maintainers have the right and responsibility to remove, edit, or
-reject comments, commits, code, wiki edits, issues, and other contributions
-that are not aligned to this Code of Conduct, or to ban temporarily or
-permanently any contributor for other behaviors that they deem inappropriate,
-threatening, offensive, or harmful.
-
-### Scope
-
-This Code of Conduct applies both within project spaces and in public spaces
-when an individual is representing the project or its community. Examples of
-representing a project or community include using an official project e-mail
-address, posting via an official social media account, or acting as an appointed
-representative at an online or offline event. Representation of a project may be
-further defined and clarified by project maintainers.
-
-### Enforcement
-
-Instances of abusive, harassing, or otherwise unacceptable behavior may be
-reported by contacting the project team at SudhanPlayz@gmail.com. All
-complaints will be reviewed and investigated and will result in a response that
-is deemed necessary and appropriate to the circumstances. The project team is
-obligated to maintain confidentiality with regard to the reporter of an incident.
-Further details of specific enforcement policies may be posted separately.
-
-Project maintainers who do not follow or enforce the Code of Conduct in good
-faith may face temporary or permanent repercussions as determined by other
-members of the project's leadership.
-
-### Attribution
-
-This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
-available at [http://contributor-covenant.org/version/1/4][version]
-
-[homepage]: http://contributor-covenant.org
-[version]: http://contributor-covenant.org/version/1/4/

+ 0 - 72
bot/LICENSE

@@ -1,72 +0,0 @@
-Apache License 
-Version 2.0, January 2004 
-http://www.apache.org/licenses/
-TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-1. Definitions.
-
-"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
-
-"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
-
-"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
-
-"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
-
-"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
-
-"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
-
-"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
-
-"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
-
-"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
-
-"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
-
-2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
-
-3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
-
-4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
-
-(a) You must give any other recipients of the Work or Derivative Works a copy of this License; and
-
-(b) You must cause any modified files to carry prominent notices stating that You changed the files; and
-
-(c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
-
-(d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
-
-You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
-
-5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
-
-6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
-
-7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
-
-8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
-
-9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
-
-END OF TERMS AND CONDITIONS
-
-APPENDIX: How to apply the Apache License to your work.
-
-To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
-
-Copyright [yyyy] [name of copyright owner]
-
-Licensed under the Apache License, Version 2.0 (the "License"); 
-you may not use this file except in compliance with the License. 
-You may obtain a copy of the License at
-
-http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software 
-distributed under the License is distributed on an "AS IS" BASIS, 
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
-See the License for the specific language governing permissions and 
-limitations under the License.

+ 0 - 7
bot/LICENSE.md

@@ -1,7 +0,0 @@
-<h1 align="center">License for Discord-MusicBot</h1>
-
-- The credits should not be changed.
-- You can make your bot public ![EpicYay](https://cdn.discordapp.com/emojis/825211636171800596.gif?v=1&size=32)
-- Don't republish like uploading a yt vid like im doing...
-- Don't create your own repo, If you wanted to add my codes then just fork
-- (Optional) Make sure to [subscribe](https://youtube.com/CodingWithSudhan) :)

+ 0 - 1
bot/Procfile

@@ -1 +0,0 @@
-worker: npm start

+ 0 - 15
bot/api/Middlewares/Auth.js

@@ -1,15 +0,0 @@
-let config;
-try {
-  //Config for testing
-  config = require("../../dev-config");
-} catch {
-  //Config for production
-  config = require("../../config");
-}
-
-const Auth = (req, res, next) => {
-  if (!req.user) return res.redirect(config.CallbackURL);
-  else next();
-};
-
-module.exports = Auth;

+ 0 - 15
bot/api/Routes/user.js

@@ -1,15 +0,0 @@
-const { Permissions } = require("discord.js");
-const client = require("../../");
-const api = require("express").Router();
-
-api.get("/", async (req, res) => {
-  if (!req.user) return res.send({});
-  req.user.guilds.map((g) => {
-    g.hasPerms = new Permissions(g.permissions).has("MANAGE_GUILD", true);
-    g.inGuild = client.guilds.cache.has(g.id);
-    return g;
-  });
-  res.send({ user: req.user });
-});
-
-module.exports = api;

+ 0 - 80
bot/api/index.js

@@ -1,80 +0,0 @@
-const { static, Router } = require("express");
-const api = Router();
-const fs = require("fs");
-const { join } = require("path");
-
-const RoutesPath = join(__dirname, "Routes");
-
-fs.readdir(RoutesPath, (err, files) => {
-  if (err) return console.log(err);
-  files.forEach((file) => {
-    api.use("/api/" + file.split(".")[0], require(RoutesPath + "/" + file));
-  });
-});
-
-api.use("/", static(join(__dirname, "..", "assets")));
-
-//Handle Login and other stuff
-
-const session = require("express-session");
-const DiscordStrategy = require("passport-discord").Strategy;
-const passport = require("passport");
-
-let config;
-try {
-  //Config for testing
-  config = require("../dev-config");
-} catch {
-  //Config for production
-  config = require("../config");
-}
-
-passport.use(
-  new DiscordStrategy(
-    {
-      clientID: config.ClientID,
-      clientSecret: config.ClientSecret,
-      callbackURL: config.Website + config.CallbackURL,
-      scope: config.Scopes.join(" "),
-    },
-    function (accessToken, refreshToken, profile, done) {
-      //User logged in yay!
-      process.nextTick(function () {
-        return done(null, profile);
-      });
-    }
-  )
-);
-
-api.use(
-  session({
-    secret: config.CookieSecret,
-    resave: false,
-    saveUninitialized: false,
-  })
-);
-
-api.use(passport.initialize());
-api.use(passport.session());
-
-api.get(
-  config.CallbackURL,
-  passport.authenticate("discord", {
-    failureRedirect: "/",
-  }),
-  function (req, res) {
-    res.redirect("/dashboard");
-  }
-);
-
-passport.serializeUser(function (user, done) {
-  done(null, user);
-});
-
-passport.deserializeUser(function (obj, done) {
-  done(null, obj);
-});
-
-api.use("/", require("./routes"));
-
-module.exports = api;

+ 0 - 70
bot/api/routes.js

@@ -1,70 +0,0 @@
-const api = require("express").Router();
-const { Collection } = require("discord.js");
-const { join } = require("path");
-let config;
-try {
-  //Config for testing
-  config = require("../dev-config");
-} catch {
-  //Config for production
-  config = require("../config");
-}
-const Auth = require("./Middlewares/Auth");
-const fs = require("fs");
-
-let CommandsDir = join(__dirname, "..", "commands");
-let Commands = [];
-
-fs.readdir(CommandsDir, (err, files) => {
-  if (err) this.log(err);
-  else
-    files.forEach((file) => {
-      let cmd = require(CommandsDir + "/" + file);
-      if (!cmd.name || !cmd.description || !cmd.run) return;
-      Commands.push({
-        name: cmd.name,
-        aliases: cmd.aliases,
-        usage: cmd.usage,
-        description: cmd.description,
-      });
-    });
-});
-
-api.get("/", (req, res) => {
-  res.sendFile(join(__dirname, "..", "views", "index.html"));
-});
-
-api.get("/dashboard", Auth, (req, res) => {
-  res.sendFile(join(__dirname, "..", "views", "dashboard.html"));
-});
-
-api.get("/servers", Auth, (req, res) => {
-  res.sendFile(join(__dirname, "..", "views", "servers.html"));
-});
-
-api.get("/servers/:id", Auth, (req, res) => {
-  if (!req.user.guilds.find((x) => x.id == req.params.id))
-    return res.redirect("/servers");
-  res.sendFile(join(__dirname, "..", "views", "server.html"));
-});
-
-api.get("/api/info", (req, res) => {
-  res.send({
-    ClientID: config.ClientID,
-    Permissions: config.Permissions,
-    Scopes: config.Scopes,
-    Website: config.Website,
-    CallbackURL: config.CallbackURL,
-  });
-});
-
-api.get("/api/commands", (req, res) => {
-  res.send({ commands: Commands });
-});
-
-api.get("/logout", (req, res) => {
-  if (req.user) req.logout();
-  res.redirect("/");
-});
-
-module.exports = api;

+ 0 - 67
bot/api/socket/index.js

@@ -1,67 +0,0 @@
-const { Server } = require("socket.io");
-const prettyMilliseconds = require("pretty-ms");
-
-/**
- * @param {Server} io
- */
-module.exports = (io) => {
-  io.on("connection", (socket) => {
-    //Bot's Main Page
-    socket.on("dashboard", () => {
-      if (socket.Dashboard) clearInterval(socket.Dashboard);
-      socket.Dashboard = setInterval(() => {
-        const Client = require("../../index");
-        if (!Client.Ready) return;
-        socket.emit("dashboard", {
-          commands: Client.CommandsRan,
-          users: Client.users.cache.size,
-          guilds: Client.guilds.cache.size,
-          songs: Client.SongsPlayed,
-        });
-      }, 1000);
-    });
-
-    socket.on("server", (ServerID) => {
-      if (socket.Server) clearInterval(socket.Server);
-      socket.Server = setInterval(async () => {
-        const Client = require("../../index");
-        if (!Client.Ready) return;
-        let Guild = Client.guilds.cache.get(ServerID);
-        if (!Guild) return socket.emit("error", "Unable to find that server");
-        let GuildDB = await Client.GetGuild(Guild.id);
-        let player = Client.Manager.get(Guild.id);
-        if (!player) {
-          socket.emit("server", {
-            queue: 0,
-            songsLoop: "Disabled",
-            queueLoop: "Disabled",
-            prefix: GuildDB ? GuildDB.prefix : Client.config.DefaultPrefix,
-          });
-        } else {
-          socket.emit("server", {
-            queue: player.queue ? player.queue.length : 0,
-            songsLoop: player.trackRepeat ? "Enabled" : "Disabled",
-            queueLoop: player.queueRepeat ? "Enabled" : "Disabled",
-            prefix: GuildDB ? GuildDB.prefix : Client.config.DefaultPrefix,
-            bar: player.queue.current
-              ? Client.ProgressBar(
-                  player.position,
-                  player.queue.current.duration,
-                  20
-                ).Bar
-              : false,
-            maxDuration: player.queue.current
-              ? prettyMilliseconds(player.queue.current.duration, {
-                  colonNotation: true,
-                })
-              : false,
-            position: player.queue.current
-              ? prettyMilliseconds(player.position, { colonNotation: true })
-              : false,
-            nowPlaying: player.queue.current ? player.queue.current : false,
-          });
-        }
-      }, 1000);
-    });
-  });
-};

+ 0 - 19
bot/app.json

@@ -1,19 +0,0 @@
-{
-    "name": "Dexter-Bots",
-    "description": "discord music bot with the discord.js with Song Name playing. It can able to play music with the song name",
-    "repository": "not Valable",
-    "logo": "https://cdn.discordapp.com/avatars/750613142488481843/e6326038dbe2243ca551ba5b6ecd8bf2.png?size=1024",
-    "keywords": ["node", "discord", "youtube", "music", "bot", "lavalink", "dashboard"],
-    "image": "heroku/nodejs",
-    "buildpacks": [
-        {
-            "url": "heroku/nodejs"
-        }
-    ],
-    "env": {
-        "Token": {
-            "description": "Not Valable",
-            "required": "false"
-        }
-    }
-}

BIN
bot/assets/Features.png


BIN
bot/assets/Screenshot_1.png


BIN
bot/assets/Screenshot_2.png


BIN
bot/assets/Screenshot_3.png


BIN
bot/assets/logo.gif


+ 0 - 79
bot/commands/bassboost.js

@@ -1,79 +0,0 @@
-const { MessageEmbed } = require("discord.js");
-const { TrackUtils } = require("erela.js");
-const levels = {
-    none: 0.0,
-    low: 0.2,
-    medium: 0.3,
-    high: 0.35,
-};
-module.exports = {
-    name: "bassboost",
-    description: "Enables bass boosting audio effect",
-    usage: "<none|low|medium|high>",
-    permissions: {
-        channel: ["VIEW_CHANNEL", "SEND_MESSAGES", "EMBED_LINKS"],
-        member: [],
-    },
-    aliases: ["bb", "bass"],
-    /**
-     *
-     * @param {import("../structures/DiscordMusicBot")} client
-     * @param {import("discord.js").Message} message
-     * @param {string[]} args
-     * @param {*} param3
-     */
-    run: async (client, message, args, { GuildDB }) => {
- 
-        let player = await client.Manager.get(message.guild.id);
-        if (!player) return client.sendTime(message.channel, "❌ | **Nothing is playing right now...**");
-        if (!message.member.voice.channel) return client.sendTime(message.channel, "❌ | **You must be in a voice channel to use this command!**");
-        //else if(message.guild.me.voice && message.guild.me.voice.channel.id !== message.member.voice.channel.id)return client.sendTime(message.channel, `❌ | **You must be in ${guild.me.voice.channel} to use this command.**`);
-        
-        if (!args[0]) return client.sendTime(message.channel, "**Please provide a bassboost level. \nAvailable Levels:** `none`, `low`, `medium`, `high`"); //if the user do not provide args [arguments]
-
-        let level = "none";
-        if (args.length && args[0].toLowerCase() in levels) level = args[0].toLowerCase();
-
-        player.setEQ(...new Array(3).fill(null).map((_, i) => ({ band: i, gain: levels[level] })));
-
-        return client.sendTime(message.channel, `✅ | **Bassboost level set to** \`${level}\``);
-    },
-    SlashCommand: {
-        options: [
-                {
-                  name: "level",
-                  description: `Please provide a bassboost level. Available Levels: low, medium, high, or none`,
-                  value: "[level]",
-                  type: 3,
-                  required: true,
-                },
-          ],
-            /**
-             *
-             * @param {import("../structures/DiscordMusicBot")} client
-             * @param {import("discord.js").Message} message
-             * @param {string[]} args
-             * @param {*} param3
-             */
-            
-        run: async (client, interaction, args, { GuildDB }) => {
-          const levels = {
-            none: 0.0,
-            low: 0.2,
-            medium: 0.3,
-            high: 0.35,
-        };
-
-            let player = await client.Manager.get(interaction.guild_id);
-            if (!player) return client.sendTime(interaction, "❌ | **Nothing is playing right now...**");
-            if (!args) return client.sendTime(interaction, "**Please provide a bassboost level. \nAvailable Levels:** `none`, `low`, `medium`, `high`"); //if the user do not provide args [arguments]
-
-            let level = "none";
-            if (args.length && args[0].value in levels) level = args[0].value;
-
-            player.setEQ(...new Array(3).fill(null).map((_, i) => ({ band: i, gain: levels[level] })));
-
-            return client.sendTime(interaction, `✅ | **Set the bassboost level to** \`${level}\``);
-        },
-    },
-};

+ 0 - 51
bot/commands/clear.js

@@ -1,51 +0,0 @@
-const { MessageEmbed } = require("discord.js");
-
-module.exports = {
-  name: "clear",
-  description: "Clears the server queue",
-  usage: "",
-  permissions: {
-    channel: ["VIEW_CHANNEL", "SEND_MESSAGES", "EMBED_LINKS"],
-    member: [],
-  },
-  aliases: ["cl", "cls"],
-  /**
-   *
-   * @param {import("../structures/DiscordMusicBot")} client
-   * @param {import("discord.js").Message} message
-   * @param {string[]} args
-   * @param {*} param3
-   */
-  run: async (client, message, args, { GuildDB }) => {
-    let player = await client.Manager.get(message.guild.id);
-    if (!player)
-      return client.sendTime(
-        message.channel,
-        "❌ | **Nothing is playing right now...**"
-      );
-
-    if (!player.queue || !player.queue.length || player.queue.length === 0)
-      return message.channel.send("There are no songs in the queue to clear!");
-    player.queue.clear();
-    let embed = new MessageEmbed()
-      .setColor("RANDOM")
-      .setDescription("✅ | **Cleared the queue!**");
-    await message.channel.send(embed);
-  },
-
-  SlashCommand: {
-    run: async (client, interaction, args, { GuildDB }) => {
-      let player = await client.Manager.get(interaction.guild_id);
-      if (!player)
-        return interaction.send("❌ | **Nothing is playing right now...**");
-
-      if (!player.queue || !player.queue.length || player.queue.length === 0)
-        return interaction.send("There are no songs in the queue to clear!");
-      player.queue.clear();
-      let embed = new MessageEmbed()
-        .setColor("RANDOM")
-        .setDescription("✅ | **Cleared the queue!**");
-      await interaction.send(embed);
-    },
-  },
-};

+ 0 - 183
bot/commands/config.js

@@ -1,183 +0,0 @@
-const { MessageEmbed, MessageReaction } = require("discord.js");
-
-module.exports = {
-  name: "config",
-  description: "Edit the bot settings",
-  usage: "",
-  permissions: {
-    channel: ["VIEW_CHANNEL", "SEND_MESSAGES", "EMBED_LINKS"],
-    member: ["ADMINISTRATOR"],
-  },
-  aliases: ["conf"],
-  /**
-   *
-   * @param {import("../structures/DiscordMusicBot")} client
-   * @param {import("discord.js").Message} message
-   * @param {string[]} args
-   * @param {*} param3
-   */
-  run: async (client, message, args, { GuildDB }) => {
-    let Config = new MessageEmbed()
-      .setAuthor("Server Config", client.config.IconURL)
-      .setColor("RANDOM")
-      .addField("Prefix", GuildDB.prefix, true)
-      .addField("DJ Role", GuildDB.DJ ? `<@&${GuildDB.DJ}>` : "Not Set", true)
-      .setDescription(`
-What would you like to edit?
-
-:one: - Server Prefix
-:two: - DJ Role
-`);
-
-    let ConfigMessage = await message.channel.send(Config);
-    await ConfigMessage.react("1️⃣");
-    await ConfigMessage.react("2️⃣");
-    let emoji = await ConfigMessage.awaitReactions(
-      (reaction, user) =>
-        user.id === message.author.id &&
-        ["1️⃣", "2️⃣"].includes(reaction.emoji.name),
-      { max: 1, errors: ["time"], time: 30000 }
-    ).catch(() => {
-      ConfigMessage.reactions.removeAll();
-      Config.setDescription(
-        "You took too long to respond. Run the command again to edit the settings."
-      );
-      ConfigMessage.edit(Config);
-    });
-    let isOk = false;
-    try {
-      emoji = emoji.first();
-    } catch {
-      isOk = true;
-    }
-    if (isOk) return; //im idiot sry ;-;
-    /**@type {MessageReaction} */
-    let em = emoji;
-    ConfigMessage.reactions.removeAll();
-    if (em._emoji.name === "1️⃣") {
-      await message.channel.send("What do you want to change it to?");
-      let prefix = await message.channel.awaitMessages(
-        (msg) => msg.author.id === message.author.id,
-        { max: 1, time: 30000, errors: ["time"] }
-      );
-      if (!prefix.first())
-        return message.channel.send("You took too long to respond.");
-      prefix = prefix.first();
-      prefix = prefix.content;
-
-      await client.database.guild.set(message.guild.id, {
-        prefix: prefix,
-        DJ: GuildDB.DJ,
-      });
-
-      message.channel.send(
-        "Successfully saved guild prefix as `" + prefix + "`"
-      );
-    } else {
-      await message.channel.send(
-        "Please mention the role you want `DJ's` to have."
-      );
-      let role = await message.channel.awaitMessages(
-        (msg) => msg.author.id === message.author.id,
-        { max: 1, time: 30000, errors: ["time"] }
-      );
-      if (!role.first())
-        return message.channel.send("You took too long to respond.");
-      role = role.first();
-      if (!role.mentions.roles.first())
-        return message.channel.send(
-          "Please mention the role that you want for DJ's only."
-        );
-      role = role.mentions.roles.first();
-
-      await client.database.guild.set(message.guild.id, {
-        prefix: GuildDB.prefix,
-        DJ: role.id,
-      });
-
-      message.channel.send(
-        "Successfully saved guild prefix as <@&" + role.id + ">"
-      );
-    }
-  },
-
-  SlashCommand: {
-    options: [
-      {
-        name: "Prefix",
-        description: "Check the bot's prefix",
-        type: 1,
-        required: false,
-        options: [
-          {
-            name: "symbol",
-            description: "Set the bot's prefix",
-            type: 3,
-            required: true,
-          },
-        ],
-      },
-      {
-        name: "DJRole",
-        description: "Check the DJ role",
-        type: 1,
-        required: false,
-        options: [
-          {
-            name: "role",
-            description: "Set the DJ role",
-            type: 8,
-            required: true,
-          },
-        ],
-      },
-    ],
-
-    run: async (client, interaction, args, { GuildDB }) => {
-      let config = interaction.data.options[0].name;
-      let member = await interaction.guild.members.fetch(interaction.user_id);
-      //TODO: if no admin perms return...
-      if (config === "prefix") {
-        //prefix stuff
-        if (
-          interaction.data.options[0].options &&
-          interaction.data.options[0].options[0]
-        ) {
-          //has prefix
-          let prefix = interaction.data.options[0].options[0].value;
-          await client.database.guild.set(interaction.guild.id, {
-            prefix: prefix,
-            DJ: GuildDB.DJ,
-          });
-          interaction.send(`The prefix has now been set to \`${prefix}\``);
-        } else {
-          //has not prefix
-          interaction.send(`Prefix of the server is \`${GuildDB.prefix}\``);
-        }
-      } else if (config === "djrole") {
-        //DJ role
-        if (
-          interaction.data.options[0].options &&
-          interaction.data.options[0].options[0]
-        ) {
-          let role = interaction.guild.roles.cache.get(
-            interaction.data.options[0].options[0].value
-          );
-          await client.database.guild.set(interaction.guild.id, {
-            prefix: GuildDB.prefix,
-            DJ: role.id,
-          });
-          interaction.send(
-            `Successfully changed DJ role of this server to ${role.name}`
-          );
-        } else {
-          /**
-           * @type {require("discord.js").Role}
-           */
-          let role = interaction.guild.roles.cache.get(GuildDB.DJ);
-          interaction.send(`DJ Role of the server is ${role.name}`);
-        }
-      }
-    },
-  },
-};

+ 0 - 82
bot/commands/grab.js

@@ -1,82 +0,0 @@
-const { MessageEmbed } = require("discord.js");
-const prettyMilliseconds = require("pretty-ms");
-
-module.exports = {
-  name: "grab",
-  description: "Saves the current playing song to your Direct Messages",
-  usage: "",
-  permissions: {
-    channel: ["VIEW_CHANNEL", "SEND_MESSAGES", "EMBED_LINKS"],
-    member: [],
-  },
-  aliases: ["save"],
-/**
-*
-* @param {import("../structures/DiscordMusicBot")} client
-* @param {import("discord.js").Message} message
-* @param {string[]} args
-* @param {*} param3
-*/
-run: async (client, message, args, { GuildDB }) => {
-  let player = await client.Manager.get(message.guild.id);
-  if (!player) return client.sendTime(message.channel, "❌ | **Nothing is playing right now...**");
-  if (!message.member.voice.channel) return client.sendTime(message.channel, "❌ | **You must be in a voice channel to use this command!**");
-   message.author.send(new MessageEmbed()
-   .setAuthor(`Saved Song:`, client.user.displayAvatarURL({
-    dynamic: true
-  }))
-  .setThumbnail(`https://img.youtube.com/vi/${player.queue.current.identifier}/mqdefault.jpg`)
-  .setURL(player.queue.current.uri)
-  .setColor("RANDOM")
-  .setTitle(`**${player.queue.current.title}**`)
-  .addField(`⌛ Duration: `, `\`${prettyMilliseconds(player.queue.current.duration, {colonNotation: true})}\``, true)
-  .addField(`🎵 Author: `, `\`${player.queue.current.author}\``, true)
-  .addField(`▶ Play it:`, `\`${GuildDB ? GuildDB.prefix : client.config.DefaultPrefix
-  }play ${player.queue.current.uri}\``)
-  .addField(`🔎 Saved in:`, `<#${message.channel.id}>`)
-  .setFooter(`Requested by: ${player.queue.current.requester.tag} | Guild: ${message.guild.name}`, player.queue.current.requester.displayAvatarURL({
-    dynamic: true
-  }))
-    ).catch(e=>{
-      return message.channel.send("**:x: Your Dm's are disabled**")
-    })    
-
-    client.sendTime(message.channel, "✅ | **Check your DMs!**")
-  },
-  SlashCommand: {
-/**
-*
-* @param {import("../structures/DiscordMusicBot")} client
-* @param {import("discord.js").Message} message
-* @param {string[]} args
-* @param {*} param3
-*/
-  run: async (client, interaction, args, { GuildDB }) => {
-    const user = client.users.cache.get(interaction.member.user.id);
-    let player = await client.Manager.get(interaction.guild_id);
-    if (!player) return client.sendTime(interaction, "❌ | **Nothing is playing right now...**");
-    try{
-    let embed = new MessageEmbed()
-      .setAuthor(`Saved Song: `, client.user.displayAvatarURL())
-      .setThumbnail(`https://img.youtube.com/vi/${player.queue.current.identifier}/mqdefault.jpg`)
-      .setURL(player.queue.current.uri)
-      .setColor("RANDOM")
-      .setTimestamp()
-      .setTitle(`**${player.queue.current.title}**`)
-      .addField(`⌛ Duration: `, `\`${prettyMilliseconds(player.queue.current.duration, {colonNotation: true})}\``, true)
-      .addField(`🎵 Author: `, `\`${player.queue.current.author}\``, true)
-      .addField(`▶ Play it:`, `\`${GuildDB ? GuildDB.prefix : client.config.DefaultPrefix
-        }play ${player.queue.current.uri}\``)
-      .addField(`🔎 Saved in:`, `<#${interaction.channel_id}>`)
-      .setFooter(`Requested by: ${player.queue.current.requester.tag}`, player.queue.current.requester.displayAvatarURL({
-        dynamic: true
-      }))
-      user.send(embed);
-    }catch(e) {
-      return client.sendTime(interaction, "**:x: Your DMs are disabled**")
-    }
-
-    client.sendTime(interaction, "✅ | **Check your DMs!**")
-  },
-  },
-};

+ 0 - 156
bot/commands/help.js

@@ -1,156 +0,0 @@
-const { MessageEmbed } = require("discord.js");
-
-module.exports = {
-  name: "help",
-  description: "To know about the bot and commands",
-  usage: "[command]",
-  permissions: {
-    channel: ["VIEW_CHANNEL", "SEND_MESSAGES", "EMBED_LINKS"],
-    member: [],
-  },
-  aliases: ["command", "commands", "cmd"],
-  /**
-   *
-   * @param {import("../structures/DiscordMusicBot")} client
-   * @param {import("discord.js").Message} message
-   * @param {string[]} args
-   * @param {*} param3
-   */
-  run: async (client, message, args, { GuildDB }) => {
-    let Commands = client.commands.map(
-      (cmd) =>
-        `\`${GuildDB ? GuildDB.prefix : client.config.DefaultPrefix}${
-          cmd.name
-        }${cmd.usage ? " " + cmd.usage : ""}\` - ${cmd.description}`
-    );
-
-    let Embed = new MessageEmbed()
-      .setAuthor(`Commands of ${client.user.username}`, client.config.IconURL)
-      .setColor("RANDOM")
-      .setTitle(
-        `To get info of each command type ${
-          GuildDB ? GuildDB.prefix : client.config.DefaultPrefix
-        }help [Command]`
-      ).setDescription(`${Commands.join("\n")}
-Discord 𝐖𝐄-𝐁𝐨𝐭|ᵈʲ-ᵖᵃʳᵗʸ Bot Version: v${require("../package.json").version}
-[✨ Support Server](${
-      client.config.SupportServer
-    }) | [Facebook](https://www.facebook.com/dexter.radlord.001/) | By [Dexter]`);
-    if (!args[0]) message.channel.send(Embed);
-    else {
-      let cmd =
-        client.commands.get(args[0]) ||
-        client.commands.find((x) => x.aliases && x.aliases.includes(args[0]));
-      if (!cmd)
-        return client.sendError(message.channel, "Unable to find that command");
-
-      let embed = new MessageEmbed()
-        .setAuthor(`Command: ${cmd.name}`, client.config.IconURL)
-        .setDescription(cmd.description)
-        .setColor("GREEN")
-        //.addField("Name", cmd.name, true)
-        .addField("Aliases", `\`${cmd.aliases.join(", ")}\``, true)
-        .addField(
-          "Usage",
-          `\`${GuildDB ? GuildDB.prefix : client.config.DefaultPrefix}${
-            cmd.name
-          }${cmd.usage ? " " + cmd.usage : ""}\``,
-          true
-        )
-        .addField(
-          "Permissions",
-          "Member: " +
-            cmd.permissions.member.join(", ") +
-            "\nBot: " +
-            cmd.permissions.channel.join(", "),
-          true
-        )
-        .setFooter(
-          `Prefix - ${GuildDB ? GuildDB.prefix : client.config.DefaultPrefix}`
-        );
-
-      message.channel.send(embed);
-    }
-  },
-
-  SlashCommand: {
-    options: [
-      {
-        name: "command",
-        description: "Command help",
-        value: "command",
-        type: 3,
-        required: false,
-        options: [],
-
-        run: async (client, interaction, args, { GuildDB }) => {
-          let Commands = client.commands.map(
-            (cmd) =>
-              `\`${GuildDB ? GuildDB.prefix : client.config.DefaultPrefix}${
-                cmd.name
-              }${cmd.usage ? " " + cmd.usage : ""}\` - ${cmd.description}`
-          );
-
-          let Embed = new MessageEmbed()
-            .setAuthor(
-              `Commands of ${client.user.username}`,
-              client.config.IconURL
-            )
-            .setColor("RANDOM")
-            .setFooter(
-              `To get info of each command type ${
-                GuildDB ? GuildDB.prefix : client.config.DefaultPrefix
-              }help [Command] | Have a nice day!`
-            ).setDescription(`${Commands.join("\n")}
-  
-  Discord Music Bot Version: v${require("../package.json").version}
-  [✨ Support Server](${
-    client.config.SupportServer
-  }) | [Facebook](https://facebook.com/dexter.radlord.001) | By [Dexter]`);
-          if (!args[0]) interaction.send(Embed);
-          else {
-            let cmd =
-              client.commands.get(args[0]) ||
-              client.commands.find(
-                (x) => x.aliases && x.aliases.includes(args[0])
-              );
-            if (!cmd)
-              return client.sendError(
-                interaction,
-                "Unable to find that command"
-              );
-
-            let embed = new MessageEmbed()
-              .setAuthor(`Command: ${cmd.name}`, client.config.IconURL)
-              .setDescription(cmd.description)
-              .setColor("GREEN")
-              //.addField("Name", cmd.name, true)
-              .addField("Aliases", cmd.aliases.join(", "), true)
-              .addField(
-                "Usage",
-                `\`${GuildDB ? GuildDB.prefix : client.config.DefaultPrefix}${
-                  cmd.name
-                }\`${cmd.usage ? " " + cmd.usage : ""}`,
-                true
-              )
-              .addField(
-                "Permissions",
-                "Member: " +
-                  cmd.permissions.member.join(", ") +
-                  "\nBot: " +
-                  cmd.permissions.channel.join(", "),
-                true
-              )
-              .setFooter(
-                `Prefix - ${
-                  GuildDB ? GuildDB.prefix : client.config.DefaultPrefix
-                }`
-              );
-
-            interaction.send(embed);
-          }
-        },
-      },
-    ],
-  },
-};

+ 0 - 55
bot/commands/invite.js

@@ -1,55 +0,0 @@
-const { MessageEmbed } = require("discord.js");
-
-module.exports = {
-  name: "invite",
-  description: "To invite me to your server",
-  usage: "",
-  permissions: {
-    channel: ["VIEW_CHANNEL", "SEND_MESSAGES", "EMBED_LINKS"],
-    member: [],
-  },
-  aliases: ["inv"],
-  /**
-   *
-   * @param {import("../structures/DiscordMusicBot")} client
-   * @param {import("discord.js").Message} message
-   * @param {string[]} args
-   * @param {*} param3
-   */
-  run: async (client, message, args, { GuildDB }) => {
-    let embed = new MessageEmbed()
-      .setAuthor(
-        "Invite " + client.user.tag + " to your server!",
-        client.user.displayAvatarURL()
-      )
-      .setColor("BLUE")
-      .setDescription(
-        `You can invite me by clicking [here](https://discord.com/api/oauth2/authorize?client_id=
-        840587346209800203&permissions=8&scope=bot)`
-   
-      );
-    message.channel.send(embed);
-  },
-  SlashCommand: {
-    /**
-     *
-     * @param {import("../structures/DiscordMusicBot")} client
-     * @param {import("discord.js").Message} message
-     * @param {string[]} args
-     * @param {*} param3
-     */
-    run: async (client, interaction, args, { GuildDB }) => {
-      let embed = new MessageEmbed()
-        .setAuthor(
-          "Invite " + client.user.tag + " to your server!",
-          client.user.displayAvatarURL()
-        )
-        .setColor("BLUE")
-        .setDescription(
-          `You can invite me by clicking [here](https://discord.com/api/oauth2/authorize?client_id=
-        840587346209800203&permissions=8&scope=bot)`
-        );
-      interaction.send(embed);
-    },
-  },
-};

+ 0 - 73
bot/commands/leave.js

@@ -1,73 +0,0 @@
-const { MessageEmbed } = require("discord.js");
-
-module.exports = {
-  name: "leave",
-  description: "Disconnecting the bot from the voice channel",
-  usage: "",
-  permissions: {
-    channel: ["VIEW_CHANNEL", "SEND_MESSAGES", "EMBED_LINKS"],
-    member: [],
-  },
-  aliases: ["stop", "exit", "quit", "dc", "disconnect"],
-  /**
-   *
-   * @param {import("../structures/DiscordMusicBot")} client
-   * @param {import("discord.js").Message} message
-   * @param {string[]} args
-   * @param {*} param3
-   */
-  run: async (client, message, args, { GuildDB }) => {
-    let player = await client.Manager.get(message.guild.id);
-    if (!player)
-      return client.sendTime(
-        message.channel,
-        "❌ | **Nothing is playing right now...**"
-      );
-    await client.sendTime(
-      message.channel,
-      ":notes: | **The player has stopped and the queue has been cleared.**"
-    );
-    await message.react("✅");
-    player.destroy();
-  },
-
-  SlashCommand: {
-    /**
-     *
-     * @param {import("../structures/DiscordMusicBot")} client
-     * @param {import("discord.js").Message} message
-     * @param {string[]} args
-     * @param {*} param3
-     */
-    run: async (client, interaction, args, { GuildDB }) => {
-      const guild = client.guilds.cache.get(interaction.guild_id);
-      const member = guild.members.cache.get(interaction.member.user.id);
-
-      if (!member.voice.channel)
-        return client.sendTime(
-          interaction,
-          "❌ | **You must be in a voice channel to use this command.**"
-        );
-      if (
-        guild.me.voice.channel &&
-        !guild.me.voice.channel.equals(member.voice.channel)
-      )
-        return client.sendTime(
-          interaction,
-          `❌ | **You must be in ${guild.me.voice.channel} to use this command.**`
-        );
-
-      let player = await client.Manager.get(interaction.guild_id);
-      if (!player)
-        return client.sendTime(
-          interaction,
-          "❌ | **Nothing is playing right now...**"
-        );
-      player.destroy();
-      client.sendTime(
-        interaction,
-        ":notes: | **The player has stopped and the queue has been cleared.**"
-      );
-    },
-  },
-};

+ 0 - 61
bot/commands/loop.js

@@ -1,61 +0,0 @@
-const { MessageEmbed } = require("discord.js");
-const { TrackUtils } = require("erela.js");
-
-module.exports = {
-    name: "loop",
-    description: "Loop the current song",
-    usage: "",
-    permissions: {
-      channel: ["VIEW_CHANNEL", "SEND_MESSAGES", "EMBED_LINKS"],
-      member: [],
-    },
-    aliases: ["l", "repeat"],
-    /**
-      *
-      * @param {import("../structures/DiscordMusicBot")} client
-      * @param {import("discord.js").Message} message
-      * @param {string[]} args
-      * @param {*} param3
-      */
-    run: async (client, message, args, { GuildDB }) => {
-      let player = await client.Manager.get(message.guild.id);
-      if (!player) return client.sendTime(message.channel, "❌ | **Nothing is playing right now...**");
-      if (!message.member.voice.channel) return client.sendTime(message.channel, "❌ | **You must be in a voice channel to use this command!**");
-      //else if(message.guild.me.voice && message.guild.me.voice.channel.id !== message.member.voice.channel.id)return client.sendTime(message.channel, `❌ | **You must be in ${guild.me.voice.channel} to use this command.**`);
-
-        if (player.trackRepeat) {
-          player.setTrackRepeat(false)
-          client.sendTime(message.channel, `Loop \`disabled\``);
-        } else {
-          player.setTrackRepeat(true)
-          client.sendTime(message.channel, `Loop \`enabled\``);
-        }
-    },
-    SlashCommand: {
-       /**
-       *
-       * @param {import("../structures/DiscordMusicBot")} client
-       * @param {import("discord.js").Message} message
-       * @param {string[]} args
-       * @param {*} param3
-       */
-        run: async (client, interaction, args, { GuildDB }) => {
-          const guild = client.guilds.cache.get(interaction.guild_id);
-          const member = guild.members.cache.get(interaction.member.user.id);
-          const voiceChannel = member.voice.channel;
-          let player = await client.Manager.get(interaction.guild_id);
-          if (!player) return client.sendTime(interaction, "❌ | **Nothing is playing right now...**"); 
-          if (!member.voice.channel) return interaction.send("❌ | **You must be in a voice channel to use this command!**");
-          if (guild.me.voice.channel && !guild.me.voice.channel.equals(voiceChannel)) return interaction.send(`❌ | You must be in ${guild.me.voice.channel} to use this command.`);
-
-            if(player.trackRepeat){
-                  player.setTrackRepeat(false)
-                  client.sendTime(interaction, `Loop \`disabled\``);
-              }else{
-                  player.setTrackRepeat(true)
-                  client.sendTime(interaction, `Loop \`enabled\``);
-              }
-          console.log(interaction.data)
-        }
-      }    
-};

+ 0 - 62
bot/commands/loopqueue.js

@@ -1,62 +0,0 @@
-const { MessageEmbed } = require("discord.js");
-const { TrackUtils } = require("erela.js");
-
-module.exports = {
-    name: "loopqueue",
-    description: "Loop the whole queue",
-    usage: "",
-    permissions: {
-      channel: ["VIEW_CHANNEL", "SEND_MESSAGES", "EMBED_LINKS"],
-      member: [],
-    },
-    aliases: ["lq", "repeatqueue", "rq"],
-    /**
-      *
-      * @param {import("../structures/DiscordMusicBot")} client
-      * @param {import("discord.js").Message} message
-      * @param {string[]} args
-      * @param {*} param3
-      */
-    run: async (client, message, args, { GuildDB }) => {
-      let player = await client.Manager.get(message.guild.id);
-      if (!player) return client.sendTime(message.channel, "❌ | **Nothing is playing right now...**");
-      if (!message.member.voice.channel) return client.sendTime(message.channel, "❌ | **You must be in a voice channel to use this command!**");
-      //else if(message.guild.me.voice && message.guild.me.voice.channel.id !== message.member.voice.channel.id)return client.sendTime(message.channel, `❌ | **You must be in ${guild.me.voice.channel} to use this command.**`);
-
-        if (player.QueueRepeat) {
-          player.setQueueRepeat(false)
-          client.sendTime(message.channel, `Queue loop \`disabled\``);
-        } else {
-          player.setQueueRepeat(true)
-          client.sendTime(message.channel, `Queue loop \`enabled\``);
-        }
-    },
-    SlashCommand: {
-       /**
-       *
-       * @param {import("../structures/DiscordMusicBot")} client
-       * @param {import("discord.js").Message} message
-       * @param {string[]} args
-       * @param {*} param3
-       */
-        run: async (client, interaction, args, { GuildDB }) => {
-          let player = await client.Manager.get(interaction.guild_id);
-          const guild = client.guilds.cache.get(interaction.guild_id);
-            const member = guild.members.cache.get(interaction.member.user.id);
-            const voiceChannel = member.voice.channel;
-            let awaitchannel = client.channels.cache.get(interaction.channel_id); /// thanks Reyansh for this idea ;-;
-            if (!player) return client.sendTime(interaction, "❌ | **Nothing is playing right now...**"); 
-            if (!member.voice.channel) return client.sendTime(interaction, "❌ | **You must be in a voice channel to use this command.**");
-            if (guild.me.voice.channel && !guild.me.voice.channel.equals(voiceChannel)) return client.sendTime(interaction, `❌ | **You must be in ${guild.me.voice.channel} to use this command.**`);
-
-            if(player.queueRepeat){
-                  player.setQueueRepeat(false)
-                  client.sendTime(interaction, `Queue loop \`disabled\``);
-              }else{
-                  player.setQueueRepeat(true)
-                  client.sendTime(interaction, `Queue loop \`enabled\``);
-              }
-          console.log(interaction.data)
-        }
-      }    
-};

+ 0 - 98
bot/commands/lyrics.js

@@ -1,98 +0,0 @@
-const { MessageEmbed } = require("discord.js");
-const { TrackUtils } = require("erela.js");
-const lyricsFinder = require("lyrics-finder");
-const _ = require("lodash");
-
-module.exports = {
-  name: "lyrics",
-  description: "Search lyrics for any song",
-  usage: "[Song Name]",
-  permissions: {
-    channel: ["VIEW_CHANNEL", "SEND_MESSAGES", "EMBED_LINKS"],
-    member: [],
-  },
-  aliases: ["ly"],
-  /**
-   *
-   * @param {import("../structures/DiscordMusicBot")} client
-   * @param {import("discord.js").Message} message
-   * @param {string[]} args
-   * @param {*} param3
-   */
-  run: async (client, message, args, { GuildDB }) => {
-    let player = await client.Manager.get(message.guild.id);
-    let SongTitle = args.join(" ");
-    if (!args[0] && !player)
-      return message.channel.send("❌ | **Nothing is playing right now...**");
-    if (!args[0]) SongTitle = player.queue.current.title;
-    if (!args[0]) SongURL = player.queue.current.uri;
-
-    let lyrics = await lyricsFinder(SongTitle);
-    if (!lyrics)
-      return message.channel.send(`**No lyrics found for -** \`${SongTitle}\``);
-    lyrics = lyrics.split("\n"); //spliting into lines
-    let SplitedLyrics = _.chunk(lyrics, 45); //45 lines each page
-
-    let Pages = SplitedLyrics.map((ly) => {
-      let em = new MessageEmbed()
-        .setAuthor(SongTitle + "  — Lyrics", client.config.IconURL)
-        .setColor("RANDOM")
-        .setDescription(ly.join("\n"));
-
-      if (args.join(" ") !== SongTitle)
-        em.setThumbnail(player.queue.current.displayThumbnail());
-
-      return em;
-    });
-
-    if (!Pages.length || Pages.length === 1)
-      return message.channel.send(Pages[0]);
-    else return client.Pagination(message, Pages);
-  },
-
-  SlashCommand: {
-    options: [
-      {
-        name: "song",
-        value: "song",
-        type: 3,
-        description: "Get the lyrics of a song",
-        required: false,
-      },
-    ],
-    /**
-     *
-     * @param {import("../structures/DiscordMusicBot")} client
-     * @param {import("discord.js").Message} message
-     * @param {string[]} args
-     * @param {*} param3
-     */
-
-    run: async (client, interaction, args, { GuildDB }) => {
-      let player = await client.Manager.get(interaction.guild_id);
-      let SongTitle = interaction.data.options[0].value;
-      if (!SongTitle && !player)
-        return interaction.send("Nothing is playing right now...");
-      if (!SongTitle) SongTitle = player.queue.current.title;
-
-      let lyrics = await lyricsFinder(SongTitle);
-      if (!lyrics) return interaction.send("No lyrics found for " + SongTitle);
-      lyrics = lyrics.split("\n"); //spliting into lines
-      let SplitedLyrics = _.chunk(lyrics, 45); //45 lines each page
-
-      let Pages = SplitedLyrics.map((ly) => {
-        let em = new MessageEmbed()
-          .setAuthor(SongTitle + "  — Lyrics", client.config.IconURL)
-          .setColor("RANDOM")
-          .setDescription(ly.join("\n"));
-
-        if (SongTitle !== SongTitle)
-          em.setThumbnail(player.queue.current.displayThumbnail());
-
-        return em;
-      });
-
-      return interaction.send(Pages[0]);
-    },
-  },
-};

+ 0 - 89
bot/commands/nowplaying.js

@@ -1,89 +0,0 @@
-const { MessageEmbed } = require("discord.js");
-const prettyMilliseconds = require("pretty-ms");
-
-module.exports = {
-  name: "nowplaying",
-  description: "See what song is currently playing",
-  usage: "",
-  permissions: {
-    channel: ["VIEW_CHANNEL", "SEND_MESSAGES", "EMBED_LINKS"],
-    member: [],
-  },
-  aliases: ["np", "nowplaying", "now playing"],
-  /**
-   *
-   * @param {import("../structures/DiscordMusicBot")} client
-   * @param {import("discord.js").Message} message
-   * @param {string[]} args
-   * @param {*} param3
-   */
-  run: async (client, message, args, { GuildDB }) => {
-    let player = await client.Manager.get(message.guild.id);
-    if (!player)
-      return client.sendTime(
-        message.channel,
-        "❌ | **Nothing is playing right now...**"
-      );
-
-    let song = player.queue.current;
-    let QueueEmbed = new MessageEmbed()
-      .setAuthor("Currently playing", client.config.IconURL)
-      .setColor("RANDOM")
-      .setDescription(`[${song.title}](${song.uri})`)
-      .addField("Requested by", `${song.requester}`, true)
-      .addField(
-        "Duration",
-        `${
-          client.ProgressBar(player.position, player.queue.current.duration, 15)
-            .Bar
-        } \`${prettyMilliseconds(player.position, {
-          colonNotation: true,
-        })} / ${prettyMilliseconds(player.queue.current.duration, {
-          colonNotation: true,
-        })}\``
-      )
-      .setThumbnail(player.queue.current.displayThumbnail());
-    return message.channel.send(QueueEmbed);
-  },
-
-  SlashCommand: {
-    /**
-     *
-     * @param {import("../structures/DiscordMusicBot")} client
-     * @param {import("discord.js").Message} message
-     * @param {string[]} args
-     * @param {*} param3
-     */
-    run: async (client, interaction, args, { GuildDB }) => {
-      let player = await client.Manager.get(interaction.guild_id);
-      if (!player)
-        return client.sendTime(
-          interaction,
-          "❌ | **Nothing is playing right now...**"
-        );
-
-      let song = player.queue.current;
-      let QueueEmbed = new MessageEmbed()
-        .setAuthor("Currently playing", client.config.IconURL)
-        .setColor("RANDOM")
-        .setDescription(`[${song.title}](${song.uri})`)
-        .addField("Requested by", `${song.requester}`, true)
-        .addField(
-          "Duration",
-          `${
-            client.ProgressBar(
-              player.position,
-              player.queue.current.duration,
-              15
-            ).Bar
-          } \`${prettyMilliseconds(player.position, {
-            colonNotation: true,
-          })} / ${prettyMilliseconds(player.queue.current.duration, {
-            colonNotation: true,
-          })}\``
-        )
-        .setThumbnail(player.queue.current.displayThumbnail());
-      return interaction.send(QueueEmbed);
-    },
-  },
-};

+ 0 - 54
bot/commands/pause.js

@@ -1,54 +0,0 @@
-const { MessageEmbed } = require("discord.js");
-const { TrackUtils } = require("erela.js");
-
-module.exports = {
-    name: "pause",
-    description: "Pauses the music",
-    usage: "",
-    permissions: {
-        channel: ["VIEW_CHANNEL", "SEND_MESSAGES", "EMBED_LINKS"],
-        member: [],
-    },
-    aliases: [],
-    /**
-     *
-     * @param {import("../structures/DiscordMusicBot")} client
-     * @param {import("discord.js").Message} message
-     * @param {string[]} args
-     * @param {*} param3
-     */
-    run: async (client, message, args, { GuildDB }) => {
-        let player = await client.Manager.get(message.guild.id);
-        if (!player) return client.sendTime(message.channel, "❌ | **Nothing is playing right now...**");
-        if (!message.member.voice.channel) return client.sendTime(message.channel, "❌ | **You must be in a voice channel to use this command!**");
-        //else if(message.guild.me.voice && message.guild.me.voice.channel.id !== message.member.voice.channel.id)return client.sendTime(message.channel, `❌ | **You must be in ${guild.me.voice.channel} to use this command.**`);
-        if (player.paused) return client.sendTime(message.channel, "❌ | **Music is already paused!**");
-        player.pause(true);
-        let embed = new MessageEmbed().setAuthor(`Paused!`, client.config.IconURL).setColor("RANDOM").setDescription(`Type \`${GuildDB.prefix}resume\` to play!`);
-        await message.channel.send(embed);
-        await message.react("✅");
-    },
-
-    SlashCommand: {
-        /**
-     *
-     * @param {import("../structures/DiscordMusicBot")} client
-     * @param {import("discord.js").Message} message
-     * @param {string[]} args
-     * @param {*} param3
-     */
-        run: async (client, interaction, args, { GuildDB }) => {
-            const guild = client.guilds.cache.get(interaction.guild_id);
-            const member = guild.members.cache.get(interaction.member.user.id);
-
-            if (!member.voice.channel) return client.sendTime(interaction, "❌ | **You must be in a voice channel to use this command.**");
-            if (guild.me.voice.channel && !guild.me.voice.channel.equals(member.voice.channel)) return client.sendTime(interaction, `❌ | **You must be in ${guild.me.voice.channel} to use this command.**`);
-
-            let player = await client.Manager.get(interaction.guild_id);
-            if (!player) return client.sendTime(interaction, "❌ | **Nothing is playing right now...**");
-            if (player.paused) return client.sendTime(interaction, "Music is already paused!");
-            player.pause(true);
-            client.sendTime(interaction, "**⏸ Paused!**");
-        },
-    },
-};

+ 0 - 219
bot/commands/play.js

@@ -1,219 +0,0 @@
-const { MessageEmbed } = require("discord.js");
-const { TrackUtils, Player } = require("erela.js");
-const prettyMilliseconds = require("pretty-ms");
-
-module.exports = {
-    name: "play",
-    description: "Play your favorite songs",
-    usage: "[Song Name|Song URL]",
-    permissions: {
-        channel: ["VIEW_CHANNEL", "SEND_MESSAGES", "EMBED_LINKS"],
-        member: [],
-    },
-    aliases: ["p"],
-    /**
-     *
-     * @param {import("../structures/DiscordMusicBot")} client
-     * @param {import("discord.js").Message} message
-     * @param {string[]} args
-     * @param {*} param3
-     */
-    run: async (client, message, args, { GuildDB }) => {
-        if (!message.member.voice.channel) return client.sendTime(message.channel, "❌ | **You must be in a voice channel to play something!**");
-        //else if(message.guild.me.voice && message.guild.me.voice.channel.id !== message.member.voice.channel.id)return client.sendTime(message.channel, "❌ | **You must be in same voice channel as the bot is in to play something!**");
-        let SearchString = args.join(" ");
-        if (!SearchString) return client.sendTime(message.channel, `**Usage - **\`${GuildDB.prefix}play [Song Name|Song URL]\``);
-        let CheckNode = client.Manager.nodes.get(client.config.Lavalink.id);
-        let Searching = await message.channel.send(":mag_right: Searching...");
-        if (!CheckNode || !CheckNode.connected) {
-       return client.sendTime(message.channel,"❌ | Lavalink node not connected.");
-        }
-        const player = client.Manager.create({
-            guild: message.guild.id,
-            voiceChannel: message.member.voice.channel.id,
-            textChannel: message.channel.id,
-            selfDeafen: false,
-        });
-
-        let SongAddedEmbed = new MessageEmbed().setColor("RANDOM");
-
-        if (!player) return client.sendTime(message.channel, "❌ | **Nothing is playing right now...**");
-
-        if (player.state != "CONNECTED") await player.connect();
-
-        try {
-            if (SearchString.match(client.Lavasfy.spotifyPattern)) {
-                await client.Lavasfy.requestToken();
-                let node = client.Lavasfy.nodes.get(client.config.Lavalink.id);
-                let Searched = await node.load(SearchString);
-
-                if (Searched.loadType === "PLAYLIST_LOADED") {
-                    let songs = [];
-                    for (let i = 0; i < Searched.tracks.length; i++) songs.push(TrackUtils.build(Searched.tracks[i], message.author));
-                    player.queue.add(songs);
-                    if (!player.playing && !player.paused && player.queue.totalSize === Searched.tracks.length) player.play();
-                    SongAddedEmbed.setAuthor(`Playlist added to queue`, message.author.displayAvatarURL());
-                    SongAddedEmbed.addField("Enqueued", `\`${Searched.tracks.length}\` songs`, false);
-                    //SongAddedEmbed.addField("Playlist duration", `\`${prettyMilliseconds(Searched.tracks, { colonNotation: true })}\``, false)
-                    Searching.edit(SongAddedEmbed);
-                } else if (Searched.loadType.startsWith("TRACK")) {
-                    player.queue.add(TrackUtils.build(Searched.tracks[0], message.author));
-                    if (!player.playing && !player.paused && !player.queue.size) player.play();
-                    SongAddedEmbed.setAuthor(`Added to queue`, client.config.IconURL);
-                    SongAddedEmbed.setDescription(`[${Searched.tracks[0].info.title}](${Searched.tracks[0].info.uri})`);
-                    SongAddedEmbed.addField("Author", Searched.tracks[0].info.author, true);
-                    //SongAddedEmbed.addField("Duration", `\`${prettyMilliseconds(Searched.tracks[0].length, { colonNotation: true })}\``, true);
-                    if (player.queue.totalSize > 1) SongAddedEmbed.addField("Position in queue", `${player.queue.size - 0}`, true);
-                    Searching.edit(SongAddedEmbed);
-                } else {
-                    return client.sendTime(message.channel, "**No matches found for - **" + SearchString);
-                }
-            } else {
-                let Searched = await player.search(SearchString, message.author);
-                if (!player) return client.sendTime(message.channel, "❌ | **Nothing is playing right now...**");
-
-                if (Searched.loadType === "NO_MATCHES") return client.sendTime(message.channel, "**No matches found for - **" + SearchString);
-                else if (Searched.loadType == "PLAYLIST_LOADED") {
-                    player.queue.add(Searched.tracks);
-                    if (!player.playing && !player.paused && player.queue.totalSize === Searched.tracks.length) player.play();
-                    SongAddedEmbed.setAuthor(`Playlist added to queue`, client.config.IconURL);
-                    SongAddedEmbed.setThumbnail(Searched.tracks[0].displayThumbnail());
-                    SongAddedEmbed.setDescription(`[${Searched.playlist.name}](${SearchString})`);
-                    SongAddedEmbed.addField("Enqueued", `\`${Searched.tracks.length}\` songs`, false);
-                    SongAddedEmbed.addField("Playlist duration", `\`${prettyMilliseconds(Searched.playlist.duration, { colonNotation: true })}\``, false);
-                    Searching.edit(SongAddedEmbed);
-                } else {
-                    player.queue.add(Searched.tracks[0]);
-                    if (!player.playing && !player.paused && !player.queue.size) player.play();
-                    SongAddedEmbed.setAuthor(`Added to queue`, client.config.IconURL);
-
-                    SongAddedEmbed.setThumbnail(Searched.tracks[0].displayThumbnail());
-                    SongAddedEmbed.setDescription(`[${Searched.tracks[0].title}](${Searched.tracks[0].uri})`);
-                    SongAddedEmbed.addField("Author", Searched.tracks[0].author, true);
-                    SongAddedEmbed.addField("Duration", `\`${prettyMilliseconds(Searched.tracks[0].duration, { colonNotation: true })}\``, true);
-                    if (player.queue.totalSize > 1) SongAddedEmbed.addField("Position in queue", `${player.queue.size - 0}`, true);
-                    Searching.edit(SongAddedEmbed);
-                }
-            }
-        } catch (e) {
-            console.log(e);
-            return client.sendTime(message.channel, "**No matches found for - **" + SearchString);
-        }
-    },
-
-    SlashCommand: {
-        options: [
-            {
-                name: "song",
-                value: "song",
-                type: 3,
-                required: true,
-                description: "Play music in the voice channel",
-            },
-        ],
-        /**
-         *
-         * @param {import("../structures/DiscordMusicBot")} client
-         * @param {import("discord.js").Message} message
-         * @param {string[]} args
-         * @param {*} param3
-         */
-        run: async (client, interaction, args, { GuildDB }) => {
-            const guild = client.guilds.cache.get(interaction.guild_id);
-            const member = guild.members.cache.get(interaction.member.user.id);
-            const voiceChannel = member.voice.channel;
-            let awaitchannel = client.channels.cache.get(interaction.channel_id); /// thanks Reyansh for this idea ;-;
-            if (!member.voice.channel) return client.sendTime(interaction, "❌ | **You must be in a voice channel to use this command.**");
-            if (guild.me.voice.channel && !guild.me.voice.channel.equals(member.voice.channel)) return client.sendTime(interaction, `❌ | **You must be in ${guild.me.voice.channel} to use this command.**`);
-            let CheckNode = client.Manager.nodes.get(client.config.Lavalink.id);
-            if (!CheckNode || !CheckNode.connected) {
-              return client.sendTime(interaction,"❌ | Lavalink node not connected.");
-            }
-    
-            let player = client.Manager.create({
-                guild: interaction.guild_id,
-                voiceChannel: voiceChannel.id,
-                textChannel: interaction.channel_id,
-                selfDeafen: false,
-            });
-            if (player.state != "CONNECTED") await player.connect();
-            let search = interaction.data.options[0].value;
-            let res;
-
-            if (search.match(client.Lavasfy.spotifyPattern)) {
-                await client.Lavasfy.requestToken();
-                let node = client.Lavasfy.nodes.get(client.config.Lavalink.id);
-                let Searched = await node.load(search);
-
-                switch (Searched.loadType) {
-                    case "LOAD_FAILED":
-                        if (!player.queue.current) player.destroy();
-                        return interaction.send(`There was an error while searching`);
-
-                    case "NO_MATCHES":
-                        if (!player.queue.current) player.destroy();
-                        return interaction.send("No results were found.");
-                    case "TRACK_LOADED":
-                        player.queue.add(TrackUtils.build(Searched.tracks[0], member.user));
-                        if (!player.playing && !player.paused && !player.queue.length) player.play();
-                        return interaction.send(`**Searched Track** \`${Searched.tracks[0].info.title}\`.`);
-
-                    case "SEARCH_RESULT":
-                        player.queue.add(TrackUtils.build(Searched.tracks[0], member.user));
-                        if (!player.playing && !player.paused && !player.queue.length) player.play();
-                        return interaction.send(`**Searched Track** \`${Searched.tracks[0].info.title}\`.`);
-
-                    case "PLAYLIST_LOADED":
-                        let songs = [];
-                        for (let i = 0; i < Searched.tracks.length; i++) songs.push(TrackUtils.build(Searched.tracks[i], member.user));
-                        player.queue.add(songs);
-
-                        if (!player.playing && !player.paused && player.queue.totalSize === Searched.tracks.length) player.play();
-                        return interaction.send(`**Searched playlist**: \n **${Searched.tracks[0].info.title}** : **${Searched.tracks.length} tracks**`);
-                }
-            } else {
-                try {
-                    res = await player.search(search, member.user);
-                    if (res.loadType === "LOAD_FAILED") {
-                        if (!player.queue.current) player.destroy();
-                        throw new Error(res.exception.message);
-                    }
-                } catch (err) {
-                    return interaction.send(`There was an error while searching: ${err.message}`);
-                }
-                switch (res.loadType) {
-                    case "NO_MATCHES":
-                        if (!player.queue.current) player.destroy();
-                        return interaction.send("No results were found.");
-                    case "TRACK_LOADED":
-                        player.queue.add(res.tracks[0]);
-                        if (!player.playing && !player.paused && !player.queue.length) player.play();
-                        return client.sendTime(interaction, `**Added to queue** \n[${res.tracks[0].title}](${res.tracks[0].uri})`);
-                    case "PLAYLIST_LOADED":
-                        player.queue.add(res.tracks);
-
-                        if (!player.playing && !player.paused && player.queue.size === res.tracks.length) player.play();
-                        return client.sendTime(interaction, `**Searched playlist**: \n **${res.playlist.name}** : **${res.tracks.length} tracks**`);
-                    case "SEARCH_RESULT":
-                        const track = res.tracks[0];
-                        player.queue.add(track);
-
-                        if (!player.playing && !player.paused && !player.queue.length) {
-                            client.sendTime(interaction, `**Added to queue** [${res.tracks[0].title}](${res.tracks[0].uri})`);
-                            player.play();
-                        } else {
-                            let SongAddedEmbed = new MessageEmbed();
-                            SongAddedEmbed.setAuthor(`Added to queue`, client.config.IconURL);
-                            SongAddedEmbed.setThumbnail(track.displayThumbnail());
-                            SongAddedEmbed.setColor("RANDOM");
-                            SongAddedEmbed.setDescription(`[${track.title}](${track.uri})`);
-                            SongAddedEmbed.addField("Author", track.author, true);
-                            SongAddedEmbed.addField("Duration", `\`${prettyMilliseconds(track.duration, { colonNotation: true })}\``, true);
-                            if (player.queue.totalSize > 1) SongAddedEmbed.addField("Position in queue", `${player.queue.size - 0}`, true);
-                            interaction.send(SongAddedEmbed);
-                        }
-                }
-            }
-        },
-    },
-};

+ 0 - 210
bot/commands/queue.js

@@ -1,210 +0,0 @@
-const { MessageEmbed } = require("discord.js");
-const _ = require("lodash");
-const prettyMilliseconds = require("pretty-ms");
-
-module.exports = {
-  name: "queue",
-  description: "The server queue",
-  usage: "",
-  permissions: {
-    channel: ["VIEW_CHANNEL", "SEND_MESSAGES", "EMBED_LINKS"],
-    member: [],
-  },
-  aliases: ["q"],
-  /**
-   *
-   * @param {import("../structures/DiscordMusicBot")} client
-   * @param {import("discord.js").Message} message
-   * @param {string[]} args
-   * @param {*} param3
-   */
-  run: async (client, message, args, { GuildDB }) => {
-    let player = await client.Manager.get(message.guild.id);
-    if (!player)
-      return client.sendTime(
-        message.channel,
-        "❌ | **Nothing is playing right now...**"
-      );
-
-    if (!player.queue || !player.queue.length || player.queue === 0) {
-      let QueueEmbed = new MessageEmbed()
-        .setAuthor("Currently playing", client.config.IconURL)
-        .setColor("RANDOM")
-        .setDescription(
-          `[${player.queue.current.title}](${player.queue.current.uri})`
-        )
-        .addField("Requested by", `${player.queue.current.requester}`, true)
-        .addField(
-          "Duration",
-          `${
-            client.ProgressBar(
-              player.position,
-              player.queue.current.duration,
-              15
-            ).Bar
-          } \`[${prettyMilliseconds(player.position, {
-            colonNotation: true,
-          })} / ${prettyMilliseconds(player.queue.current.duration, {
-            colonNotation: true,
-          })}]\``
-        )
-        .setThumbnail(player.queue.current.displayThumbnail());
-      return message.channel.send(QueueEmbed);
-    }
-
-    let Songs = player.queue.map((t, index) => {
-      t.index = index;
-      return t;
-    });
-
-    let ChunkedSongs = _.chunk(Songs, 10); //How many songs to show per-page
-
-    let Pages = ChunkedSongs.map((Tracks) => {
-      let SongsDescription = Tracks.map(
-        (t) =>
-          `\`${t.index + 1}.\` [${t.title}](${t.uri}) \n\`${prettyMilliseconds(
-            t.duration,
-            {
-              colonNotation: true,
-            }
-          )}\` **|** Requested by: ${t.requester}\n`
-      ).join("\n");
-
-      let Embed = new MessageEmbed()
-        .setAuthor("Queue", client.config.IconURL)
-        .setColor("RANDOM")
-        .setDescription(
-          `**Currently Playing:** \n[${player.queue.current.title}](${player.queue.current.uri}) \n\n**Up Next:** \n${SongsDescription}\n\n`
-        )
-        .addField("Total songs: \n", `\`${player.queue.totalSize - 1}\``, true)
-        .addField(
-          "Total length: \n",
-          `\`${prettyMilliseconds(player.queue.duration, {
-            colonNotation: true,
-          })}\``,
-          true
-        )
-        .addField("Requested by:", `${player.queue.current.requester}`, true)
-        .addField(
-          "Current song duration:",
-          `${
-            client.ProgressBar(
-              player.position,
-              player.queue.current.duration,
-              15
-            ).Bar
-          } \`${prettyMilliseconds(player.position, {
-            colonNotation: true,
-          })} / ${prettyMilliseconds(player.queue.current.duration, {
-            colonNotation: true,
-          })}\``
-        )
-        .setThumbnail(player.queue.current.displayThumbnail());
-
-      return Embed;
-    });
-
-    if (!Pages.length || Pages.length === 1)
-      return message.channel.send(Pages[0]);
-    else client.Pagination(message, Pages);
-  },
-  SlashCommand: {
-    /**
-     *
-     * @param {import("../structures/DiscordMusicBot")} client
-     * @param {import("discord.js").Message} message
-     * @param {string[]} args
-     * @param {*} param3
-     */
-    run: async (client, interaction, args, { GuildDB }) => {
-      let player = await client.Manager.get(interaction.guild_id);
-      if (!player)
-        return interaction.send("❌ | **Nothing is playing right now...**");
-
-      if (!player.queue || !player.queue.length || player.queue === 0) {
-        let QueueEmbed = new MessageEmbed()
-          .setAuthor("Currently playing", client.config.IconURL)
-          .setColor("RANDOM")
-          .setDescription(
-            `[${player.queue.current.title}](${player.queue.current.uri})`
-          )
-          .addField("Requested by", `${player.queue.current.requester}`, true)
-          .addField(
-            "Duration",
-            `${
-              client.ProgressBar(
-                player.position,
-                player.queue.current.duration,
-                15
-              ).Bar
-            } \`[${prettyMilliseconds(player.position, {
-              colonNotation: true,
-            })} / ${prettyMilliseconds(player.queue.current.duration, {
-              colonNotation: true,
-            })}]\``
-          )
-          .setThumbnail(player.queue.current.displayThumbnail());
-        return interaction.send(QueueEmbed);
-      }
-
-      let Songs = player.queue.map((t, index) => {
-        t.index = index;
-        return t;
-      });
-
-      let ChunkedSongs = _.chunk(Songs, 10); //How many songs to show per-page
-
-      let Pages = ChunkedSongs.map((Tracks) => {
-        let SongsDescription = Tracks.map(
-          (t) =>
-            `\`${t.index + 1}.\` [${t.title}](${
-              t.uri
-            }) \n\`${prettyMilliseconds(t.duration, {
-              colonNotation: true,
-            })}\` **|** Requested by: ${t.requester}\n`
-        ).join("\n");
-
-        let Embed = new MessageEmbed()
-          .setAuthor("Queue", client.config.IconURL)
-          .setColor("RANDOM")
-          .setDescription(
-            `**Currently Playing:** \n[${player.queue.current.title}](${player.queue.current.uri}) \n\n**Up Next:** \n${SongsDescription}\n\n`
-          )
-          .addField(
-            "Total songs: \n",
-            `\`${player.queue.totalSize - 1}\``,
-            true
-          )
-          .addField(
-            "Total length: \n",
-            `\`${prettyMilliseconds(player.queue.duration, {
-              colonNotation: true,
-            })}\``,
-            true
-          )
-          .addField("Requested by:", `${player.queue.current.requester}`, true)
-          .addField(
-            "Current song duration:",
-            `${
-              client.ProgressBar(
-                player.position,
-                player.queue.current.duration,
-                15
-              ).Bar
-            } \`[${prettyMilliseconds(player.position, {
-              colonNotation: true,
-            })} / ${prettyMilliseconds(player.queue.current.duration, {
-              colonNotation: true,
-            })}]\``
-          )
-          .setThumbnail(player.queue.current.displayThumbnail());
-
-        return Embed;
-      });
-
-      if (!Pages.length || Pages.length === 1)
-        return interaction.send(Pages[0]);
-      else client.Pagination(interaction, Pages);
-    },
-  },
-};

+ 0 - 76
bot/commands/remove.js

@@ -1,76 +0,0 @@
-const { MessageEmbed } = require("discord.js");
-const { TrackUtils } = require("erela.js");
-
-  module.exports = {
-    name: "remove",
-    description: `Remove a song from the queue`,
-    usage: "[number]",
-    permissions: {
-      channel: ["VIEW_CHANNEL", "SEND_MESSAGES", "EMBED_LINKS"],
-      member: [],
-    },
-    aliases: ["rm"],
-
-    /**
-   *
-   * @param {import("../structures/DiscordMusicBot")} client
-   * @param {import("discord.js").Message} message
-   * @param {string[]} args
-   * @param {*} param3
-   */
-  run: async (client, message, args, { GuildDB }) => {
-    let player = await client.Manager.players.get(message.guild.id);
-    const song = player.queue.slice(args[0] - 1, 1); 
-    if (!player) return client.sendTime(message.channel, "❌ | **Nothing is playing right now...**");
-    if (!message.member.voice.channel) return client.sendTime(message.channel, "❌ | **You must be in a voice channel to use this command!**");
-    //else if(message.guild.me.voice && message.guild.me.voice.channel.id !== message.member.voice.channel.id)return client.sendTime(message.channel, `❌ | **You must be in ${guild.me.voice.channel} to use this command.**`);
-        
-    if (!player.queue || !player.queue.length || player.queue.length === 0)
-      return message.channel.send("There is nothing in the queue to remove");
-    let rm = new MessageEmbed()
-      .setDescription(`✅ **|** Removed track **\`${Number(args[0])}\`** from the queue!`)
-      .setColor("GREEN")
-      if (isNaN(args[0]))rm.setDescription(`**Usage - **${client.config.prefix}\`remove [number]\``);
-      if (args[0] > player.queue.length)
-      rm.setDescription(`The queue has only ${player.queue.length} songs!`);
-    await message.channel.send(rm);
-    player.queue.remove(Number(args[0]) - 1);
-  },
-
-  SlashCommand: {
-    options: [
-      {
-          name: "remove",
-          value: "[number]",
-          type: 4,
-          required: true,
-          description: "Remove a song from the queue",
-      },
-  ],
-  /**
-   *
-   * @param {import("../structures/DiscordMusicBot")} client
-   * @param {import("discord.js").Message} message
-   * @param {string[]} args
-   * @param {*} param3
-   */
-    run: async (client, interaction, args, { GuildDB }) => {
-      let player = await client.Manager.get(interaction.guild_id);
-      const song = player.queue.slice(args[0] - 1, 1);
-      if (!player) return client.sendTime("❌ | **Nothing is playing right now...**");
-      if (!member.voice.channel) return client.sendTime(interaction, "❌ | **You must be in a voice channel to use this command.**");
-      if (guild.me.voice.channel && !guild.me.voice.channel.equals(member.voice.channel)) return client.sendTime(interaction, `❌ | **You must be in ${guild.me.voice.channel} to use this command.**`);
-  
-      if (!player.queue || !player.queue.length || player.queue.length === 0)
-      return client.sendTime("❌ | **Nothing is playing right now...**");
-    let rm = new MessageEmbed()
-      .setDescription(`✅ **|** Removed track **\`${Number(args[0])}\`** from the queue!`)
-      .setColor("GREEN")
-      if (isNaN(args[0]))rm.setDescription(`Usage: ${client.config.prefix}\`remove [number]\``);
-      if (args[0] > player.queue.length)
-      rm.setDescription(`The queue has only ${player.queue.length}!`);
-    await interaction.send(rm);
-      player.queue.remove(Number(args[0]) - 1);
-    },
-  }
-};

+ 0 - 53
bot/commands/resume.js

@@ -1,53 +0,0 @@
-const { MessageEmbed } = require("discord.js");
-const { TrackUtils } = require("erela.js");
-
-module.exports = {
-    name: "resume",
-    description: "Resumes the music",
-    usage: "",
-    permissions: {
-        channel: ["VIEW_CHANNEL", "SEND_MESSAGES", "EMBED_LINKS"],
-        member: [],
-    },
-    aliases: [],
-    /**
-     *
-     * @param {import("../structures/DiscordMusicBot")} client
-     * @param {import("discord.js").Message} message
-     * @param {string[]} args
-     * @param {*} param3
-     */
-    run: async (client, message, args, { GuildDB }) => {
-        let player = await client.Manager.get(message.guild.id);
-        if (!player) return client.sendTime(message.channel, "❌ | **Nothing is playing right now...**");
-        if (!message.member.voice.channel) return client.sendTime(message.channel, "❌ | **You must be in a voice channel to use this command!**");
-        //else if(message.guild.me.voice && message.guild.me.voice.channel.id !== message.member.voice.channel.id)return client.sendTime(message.channel, `❌ | **You must be in ${guild.me.voice.channel} to use this command.**`);
-
-        if (player.playing) return message.channel.send("Music is already resumed!");
-        player.pause(false);
-        await message.react("✅");
-    },
-
-    SlashCommand: {
-        /**
-     *
-     * @param {import("../structures/DiscordMusicBot")} client
-     * @param {import("discord.js").Message} message
-     * @param {string[]} args
-     * @param {*} param3
-     */
-        run: async (client, interaction, args, { GuildDB }) => {
-            const guild = client.guilds.cache.get(interaction.guild_id);
-            const member = guild.members.cache.get(interaction.member.user.id);
-
-            if (!member.voice.channel) return client.sendTime(interaction, "❌ | **You must be in a voice channel to use this command.**");
-            if (guild.me.voice.channel && !guild.me.voice.channel.equals(member.voice.channel)) return client.sendTime(interaction, `❌ | **You must be in ${guild.me.voice.channel} to use this command.**`);
-
-            let player = await client.Manager.get(interaction.guild_id);
-            if (!player) return client.sendTime(inter, "❌ | **Nothing is playing right now...**");
-            if (player.playing) return client.sendTime(interaction, "Music is already resumed!");
-            player.pause(false);
-            client.sendTime(interaction, "**⏯ Resumed!**");
-        },
-    },
-};

+ 0 - 343
bot/commands/search.js

@@ -1,343 +0,0 @@
-const { MessageEmbed, Message } = require("discord.js");
-const { TrackUtils } = require("erela.js");
-const _ = require("lodash");
-const prettyMilliseconds = require("pretty-ms");
-
-module.exports = {
-  name: "search",
-  description: "Search a song/playlist",
-  usage: "[Song Name|SongURL]",
-  permissions: {
-    channel: ["VIEW_CHANNEL", "SEND_MESSAGES", "EMBED_LINKS"],
-    member: [],
-  },
-  aliases: ["se"],
-  /**
-   *
-   * @param {import("../structures/DiscordMusicBot")} client
-   * @param {import("discord.js").Message} message
-   * @param {string[]} args
-   * @param {*} param3
-   */
-  run: async (client, message, args, { GuildDB }) => {
-    if (!message.member.voice.channel)
-      return client.sendTime(
-        message.channel,
-        "❌ | **You must be in a voice channel to play something!**"
-      );
-    //else if(message.guild.me.voice && message.guild.me.voice.channel.id !== message.member.voice.channel.id)return client.sendTime(message.channel, "❌ | **You must be in same voice channel as the bot is in to play something!**");
-
-    let SearchString = args.join(" ");
-    if (!SearchString)
-      return client.sendTime(
-        message.channel,
-        `**Usage - **\`${GuildDB.prefix}search [Song Name|SongURL]\``
-      );
-    let CheckNode = client.Manager.nodes.get(client.config.Lavalink.id);
-    if (!CheckNode || !CheckNode.connected) {
-      return client.sendTime(
-        message.channel,
-        "❌ | Lavalink node not connected."
-      );
-    }
-    const player = client.Manager.create({
-      guild: message.guild.id,
-      voiceChannel: message.member.voice.channel.id,
-      textChannel: message.channel.id,
-      selfDeafen: false,
-    });
-
-    if (player.state != "CONNECTED") await player.connect();
-
-    let Searched = await player.search(SearchString, message.author);
-    if (Searched.loadType == "NO_MATCHES")
-      return client.sendTime(
-        message.channel,
-        "No matches found for " + SearchString
-      );
-    else {
-      Searched.tracks = Searched.tracks.map((s, i) => {
-        s.index = i;
-        return s;
-      });
-      let songs = _.chunk(Searched.tracks, 10);
-      let Pages = songs.map((songz) => {
-        let MappedSongs = songz.map(
-          (s) =>
-            `\`${s.index + 1}.\` [${s.title}](${
-              s.uri
-            }) \nDuration: \`${prettyMilliseconds(s.duration, {
-              colonNotation: true,
-            })}\``
-        );
-
-        let em = new MessageEmbed()
-          .setAuthor("Search Results of " + SearchString, client.config.IconURL)
-          .setColor("RANDOM")
-          .setDescription(MappedSongs.join("\n\n"));
-        return em;
-      });
-
-      if (!Pages.length || Pages.length === 1)
-        return message.channel.send(Pages[0]);
-      else client.Pagination(message, Pages);
-
-      let w = (a) => new Promise((r) => setInterval(r, a));
-      await w(500); //waits 500ms cuz needed to wait for the above song search embed to send ._.
-      let msg = await message.channel.send(
-        "**Type the number of the song you want to play! Expires in `30 seconds`.**"
-      );
-
-      let er = false;
-      let SongID = await message.channel
-        .awaitMessages((msg) => message.author.id === msg.author.id, {
-          max: 1,
-          errors: ["time"],
-          time: 30000,
-        })
-        .catch(() => {
-          er = true;
-          msg.edit(
-            "**You took too long to respond. Run the command again if you want to play something!**"
-          );
-        });
-      if (er) return;
-      /**@type {Message} */
-      let SongIDmsg = SongID.first();
-
-      if (!parseInt(SongIDmsg.content))
-        return client.sendTime("Please send correct song ID number");
-      let Song = Searched.tracks[parseInt(SongIDmsg.content) - 1];
-      if (!Song) return message.channel.send("No song found for the given ID");
-      player.queue.add(Song);
-      if (!player.playing && !player.paused && !player.queue.size)
-        player.play();
-      let SongAddedEmbed = new MessageEmbed();
-      SongAddedEmbed.setAuthor(`Added to queue`, client.config.IconURL);
-      SongAddedEmbed.setThumbnail(Song.displayThumbnail());
-      SongAddedEmbed.setColor("RANDOM");
-      SongAddedEmbed.setDescription(`[${Song.title}](${Song.uri})`);
-      SongAddedEmbed.addField("Author", `${Song.author}`, true);
-      SongAddedEmbed.addField(
-        "Duration",
-        `\`${prettyMilliseconds(player.queue.current.duration, {
-          colonNotation: true,
-        })}\``,
-        true
-      );
-      if (player.queue.totalSize > 1)
-        SongAddedEmbed.addField(
-          "Position in queue",
-          `${player.queue.size - 0}`,
-          true
-        );
-      message.channel.send(SongAddedEmbed);
-    }
-  },
-
-  SlashCommand: {
-    options: [
-      {
-        name: "song",
-        value: "song",
-        type: 3,
-        required: true,
-        description: "Search a song/playlist",
-      },
-    ],
-    /**
-     *
-     * @param {import("../structures/DiscordMusicBot")} client
-     * @param {import("discord.js").Message} message
-     * @param {string[]} args
-     * @param {*} param3
-     */
-    run: async (client, interaction, args, { GuildDB }) => {
-      const guild = client.guilds.cache.get(interaction.guild_id);
-      const member = guild.members.cache.get(interaction.member.user.id);
-      const voiceChannel = member.voice.channel;
-      let awaitchannel = client.channels.cache.get(interaction.channel_id); /// thanks Reyansh for this idea ;-;
-      if (!member.voice.channel)
-        return client.sendTime(
-          interaction,
-          "❌ | **You must be in a voice channel to use this command.**"
-        );
-      if (
-        guild.me.voice.channel &&
-        !guild.me.voice.channel.equals(member.voice.channel)
-      )
-        return client.sendTime(
-          interaction,
-          `❌ | **You must be in ${guild.me.voice.channel} to use this command.**`
-        );
-      let CheckNode = client.Manager.nodes.get(client.config.Lavalink.id);
-      if (!CheckNode || !CheckNode.connected) {
-        return client.sendTime(
-          interaction,
-          "❌ | Lavalink node not connected."
-        );
-      }
-      let player = client.Manager.create({
-        guild: interaction.guild_id,
-        voiceChannel: voiceChannel.id,
-        textChannel: interaction.channel_id,
-        selfDeafen: false,
-      });
-      if (player.state != "CONNECTED") await player.connect();
-      let search = interaction.data.options[0].value;
-      let res;
-
-      if (search.match(client.Lavasfy.spotifyPattern)) {
-        await client.Lavasfy.requestToken();
-        let node = client.Lavasfy.nodes.get(client.config.Lavalink.id);
-        let Searched = await node.load(search);
-
-        switch (Searched.loadType) {
-          case "LOAD_FAILED":
-            if (!player.queue.current) player.destroy();
-            return interaction.send(`There was an error while searching`);
-
-          case "NO_MATCHES":
-            if (!player.queue.current) player.destroy();
-            return interaction.send("No results were found.");
-          case "TRACK_LOADED":
-            player.queue.add(TrackUtils.build(Searched.tracks[0], member.user));
-            if (!player.playing && !player.paused && !player.queue.length)
-              player.play();
-            return interaction.send(
-              `**Added to queue:** \`[${Searched.tracks[0].info.title}](${Searched.tracks[0].info.uri}}\`.`
-            );
-
-          case "PLAYLIST_LOADED":
-            let songs = [];
-            for (let i = 0; i < Searched.tracks.length; i++)
-              songs.push(TrackUtils.build(Searched.tracks[i], member.user));
-            player.queue.add(songs);
-
-            if (
-              !player.playing &&
-              !player.paused &&
-              player.queue.totalSize === Searched.tracks.length
-            )
-              player.play();
-            return interaction.send(
-              `**Playlist added to queue**: \n**${Searched.playlist.name}** \nEnqueued: **${Searched.playlistInfo.length} songs**`
-            );
-        }
-      } else {
-        try {
-          res = await player.search(search, member.user);
-          if (res.loadType === "LOAD_FAILED") {
-            if (!player.queue.current) player.destroy();
-            throw new Error(res.exception.message);
-          }
-        } catch (err) {
-          return interaction.send(
-            `There was an error while searching: ${err.message}`
-          );
-        }
-        switch (res.loadType) {
-          case "NO_MATCHES":
-            if (!player.queue.current) player.destroy();
-            return interaction.send("No results were found.");
-          case "TRACK_LOADED":
-            player.queue.add(res.tracks[0]);
-            if (!player.playing && !player.paused && !player.queue.length)
-              player.play();
-            return interaction.send(
-              `**Added to queue:** \`[${res.tracks[0].title}](${res.tracks[0].uri})\`.`
-            );
-          case "PLAYLIST_LOADED":
-            player.queue.add(res.tracks);
-
-            if (
-              !player.playing &&
-              !player.paused &&
-              player.queue.size === res.tracks.length
-            )
-              player.play();
-            return interaction.send(
-              `**Playlist added to queue**: \n**${res.playlist.name}** \nEnqueued: **${res.playlistInfo.length} songs**`
-            );
-          case "SEARCH_RESULT":
-            let max = 10,
-              collected,
-              filter = (m) =>
-                m.author.id === interaction.member.user.id &&
-                /^(\d+|end)$/i.test(m.content);
-            if (res.tracks.length < max) max = res.tracks.length;
-
-            const results = res.tracks
-              .slice(0, max)
-              .map(
-                (track, index) =>
-                  `\`${++index}\` - [${track.title}](${
-                    track.uri
-                  }) \n\t\`${prettyMilliseconds(track.duration, {
-                    colonNotation: true,
-                  })}\`\n`
-              )
-              .join("\n");
-
-            const resultss = new MessageEmbed()
-              .setDescription(
-                `${results}\n\n\t**Type the number of the song you want to play!**\n`
-              )
-              .setColor("RANDOM")
-              .setAuthor(`Search results for ${search}`, client.config.IconURL);
-            interaction.send(resultss);
-            try {
-              collected = await awaitchannel.awaitMessages(filter, {
-                max: 1,
-                time: 30e3,
-                errors: ["time"],
-              });
-            } catch (e) {
-              if (!player.queue.current) player.destroy();
-              return awaitchannel.send(
-                "❌ | **You didn't provide a selection**"
-              );
-            }
-
-            const first = collected.first().content;
-
-            if (first.toLowerCase() === "cancel") {
-              if (!player.queue.current) player.destroy();
-              return awaitchannel.send("Cancelled search.");
-            }
-
-            const index = Number(first) - 1;
-            if (index < 0 || index > max - 1)
-              return awaitchannel.send(
-                `The number you provided was greater or less than the search total. Usage - \`(1-${max})\``
-              );
-            const track = res.tracks[index];
-            player.queue.add(track);
-
-            if (!player.playing && !player.paused && !player.queue.length) {
-              player.play();
-            } else {
-              let SongAddedEmbed = new MessageEmbed();
-              SongAddedEmbed.setAuthor(`Added to queue`, client.config.IconURL);
-              SongAddedEmbed.setThumbnail(track.displayThumbnail());
-              SongAddedEmbed.setColor("RANDOM");
-              SongAddedEmbed.addField(
-                "Song",
-                `[${track.title}](${track.uri})`,
-                true
-              );
-              SongAddedEmbed.addField("Author", track.author, true);
-              SongAddedEmbed.addField(
-                "Duration",
-                `\`${prettyMilliseconds(track.duration, {
-                  colonNotation: true,
-                })}\``,
-                true
-              );
-              awaitchannel.send(SongAddedEmbed);
-            }
-        }
-      }
-    },
-  },
-};

+ 0 - 59
bot/commands/seek.js

@@ -1,59 +0,0 @@
-const { MessageEmbed } = require("discord.js");
-const { TrackUtils } = require("erela.js");
-
-module.exports = {
-    name: "seek",
-    description: "Seek to a position in the song",
-    usage: "<time s/m/h>",
-    permissions: {
-        channel: ["VIEW_CHANNEL", "SEND_MESSAGES", "EMBED_LINKS"],
-        member: [],
-    },
-    aliases: ["forward"],
-    /**
-     *
-     * @param {import("../structures/DiscordMusicBot")} client
-     * @param {import("discord.js").Message} message
-     * @param {string[]} args
-     * @param {*} param3
-     */
-    run: async (client, message, args, { GuildDB }) => {
-        let player = await client.Manager.get(message.guild.id);
-        if (!player) return client.sendTime(message.channel, "❌ | **Nothing is playing right now...**");
-        if (!message.member.voice.channel) return client.sendTime(message.channel, "❌ | **You must be in a voice channel to use this command!**");
-        if (!player.queue.current.isSeekable) return message.channel.send("This song is not able to seek from.");
-        let SeekTo = client.ParseHumanTime(args.join(" "));
-        if (!SeekTo) return message.channel.send("Please enter a time to seek!");
-        player.seek(SeekTo * 1000);
-        message.react("✅");
-    },
-
-    SlashCommand: {
-        options: [
-            {
-                name: "time",
-                description: "Seek to any part of a song",
-                value: "time",
-                type: 1,
-                required: true,
-                options: [],
-                run: async (client, interaction, args, { GuildDB }) => {
-                    const guild = client.guilds.cache.get(interaction.guild_id);
-                    const member = guild.members.cache.get(interaction.member.user.id);
-
-                    if (!member.voice.channel) return client.sendTime(interaction, "❌ | **You must be in a voice channel to use this command.**");
-                    if (guild.me.voice.channel && !guild.me.voice.channel.equals(member.voice.channel)) return client.sendTime(interaction, `❌ | **You must be in ${guild.me.voice.channel} to use this command.**`);
-
-                    let player = await client.Manager.get(interaction.guild_id);
-                    if (!player) return interaction.send("❌ | **Nothing is playing right now...**");
-                    if (!player.queue.current.isSeekable) return interaction.send("This song is not able to seek from.");
-                    let SeekTo = client.ParseHumanTime(interaction.data.options[0].value);
-                    if (!SeekTo) return interaction.send("Please enter a time to seek!");
-                    player.seek(SeekTo * 1000);
-                    interaction.send("Successfully moved the song to ", Seekto);
-                },
-            },
-        ],
-    },
-};
-

+ 0 - 45
bot/commands/shuffle.js

@@ -1,45 +0,0 @@
-const { MessageEmbed } = require("discord.js");
-
-module.exports = {
-    name: "shuffle",
-    description: "Shuffles the queue",
-    usage: "",
-    permissions: {
-        channel: ["VIEW_CHANNEL", "SEND_MESSAGES", "EMBED_LINKS"],
-        member: [],
-    },
-    aliases: ["shuff"],
-    /**
-     *
-     * @param {import("../structures/DiscordMusicBot")} client
-     * @param {import("discord.js").Message} message
-     * @param {string[]} args
-     * @param {*} param3
-     */
-    run: async (client, message, args, { GuildDB }) => {
-        let player = await client.Manager.get(message.guild.id);
-        if (!player) return client.sendTime(message.channel, "❌ | **Nothing is playing right now...**");
-        if (!message.member.voice.channel) return client.sendTime(message.channel, "❌ | **You must be in a voice channel to use this command!**");
-
-        if (!player.queue || !player.queue.length || player.queue.length === 0) return message.channel.send("Not enough songs in the queue to shuffle!");
-        player.queue.shuffle();
-        let embed = new MessageEmbed().setColor("RANDOM").setDescription(`Shuffled the queue!`);
-        await message.channel.send(embed);
-        await message.react("✅");
-    },
-    SlashCommand: {
-        run: async (client, interaction, args, { GuildDB }) => {
-            const guild = client.guilds.cache.get(interaction.guild_id);
-            const member = guild.members.cache.get(interaction.member.user.id);
-
-            if (!member.voice.channel) return client.sendTime(interaction, "❌ | **You must be in a voice channel to use this command.**");
-            if (guild.me.voice.channel && !guild.me.voice.channel.equals(member.voice.channel)) return client.sendTime(interaction, `❌ | **You must be in ${guild.me.voice.channel} to use this command.**`);
-
-            let player = await client.Manager.get(interaction.guild_id);
-            if (!player) return client.sendTime(interaction.channel, "❌ | **Nothing is playing right now...**");
-            if (!player.queue || !player.queue.length || player.queue.length === 0) return interaction.send("Not enough songs in the queue to shuffle!");
-            player.queue.shuffle();
-            interaction.send("Shuffled the queue!");
-        },
-    },
-};

+ 0 - 46
bot/commands/skip.js

@@ -1,46 +0,0 @@
-const { MessageEmbed } = require("discord.js");
-const { TrackUtils } = require("erela.js");
-
-module.exports = {
-    name: "skip",
-    description: "Skip the current song",
-    usage: "",
-    permissions: {
-        channel: ["VIEW_CHANNEL", "SEND_MESSAGES", "EMBED_LINKS"],
-        member: [],
-    },
-    aliases: ["s", "next"],
-    /**
-     *
-     * @param {import("../structures/DiscordMusicBot")} client
-     * @param {import("discord.js").Message} message
-     * @param {string[]} args
-     * @param {*} param3
-     */
-    run: async (client, message, args, { GuildDB }) => {
-        let player = await client.Manager.get(message.guild.id);
-        if (!player) return client.sendTime(message.channel, "❌ | **Nothing is playing right now...**");
-        if (!message.member.voice.channel) return client.sendTime(message.channel, "❌ | **You must be in a voice channel to use this command!**");
-        player.stop();
-        await message.react("✅");
-    },
-    SlashCommand: {
-        run: async (client, interaction, args, { GuildDB }) => {
-            const guild = client.guilds.cache.get(interaction.guild_id);
-            const member = guild.members.cache.get(interaction.member.user.id);
-
-            if (!member.voice.channel) return client.sendTime(interaction, "❌ | **You must be in a voice channel to use this command.**");
-            if (guild.me.voice.channel && !guild.me.voice.channel.equals(member.voice.channel)) return client.sendTime(interaction, `❌ | **You must be in ${guild.me.voice.channel} to use this command.**`);
-
-            const skipTo = interaction.data.options ? interaction.data.options[0].value : null;
-
-            let player = await client.Manager.get(interaction.guild_id);
-
-            if (!player) return interaction.send("Nothing is playing right now...");
-            console.log(interaction.data);
-            if (skipTo !== null && (isNaN(skipTo) || skipTo < 1 || skipTo > player.queue.length)) return interaction.send("❌ | Invalid number to skip.");
-            player.stop(skipTo);
-            interaction.send("Skipped the song");
-        },
-    },
-};

+ 0 - 118
bot/commands/skipto.js

@@ -1,118 +0,0 @@
-const { MessageEmbed } = require("discord.js");
-const { TrackUtils, Player } = require("erela.js");
-
-module.exports = {
-  name: "skipto",
-  description: `Skip to a song in the queue`,
-  usage: "<number>",
-  permissions: {
-    channel: ["VIEW_CHANNEL", "SEND_MESSAGES", "EMBED_LINKS"],
-    member: [],
-  },
-  aliases: ["st"],
-  /**
-   *
-   * @param {import("../structures/DiscordMusicBot")} client
-   * @param {import("discord.js").Message} message
-   * @param {string[]} args
-   * @param {*} param3
-   */
-   run: async (client, message, args, { GuildDB }) => {
-
-    const player = client.Manager.create({
-      guild: message.guild.id,
-      voiceChannel: message.member.voice.channel.id,
-      textChannel: message.channel.id,
-      selfDeafen: false,
-    });
-    
-    if (!player) return client.sendTime(message.channel, "❌ | **Nothing is playing right now...**");
-    if (!message.member.voice.channel) return client.sendTime(message.channel, "❌ | **You must be in a voice channel to use this command!**");
-    //else if(message.guild.me.voice && message.guild.me.voice.channel.id !== message.member.voice.channel.id)return client.sendTime(message.channel, `❌ | **You must be in ${guild.me.voice.channel} to use this command.**`);
-     
-    try {
-      if (!args[0])
-        return message.channel.send(new MessageEmbed()
-          .setColor("GREEN")
-          .setDescription(`**Usage**: \`${GuildDB.prefix}skipto [number]\``)
-        );
-      //if the wished track is bigger then the Queue Size
-      if (Number(args[0]) > player.queue.size)
-        return message.channel.send(new MessageEmbed()
-          .setColor("GREEN")
-          .setDescription(`❌ | That song is not in the queue! Please try again!`)
-        );
-      //remove all tracks to the jumped song
-      player.queue.remove(0, Number(args[0]) - 1);
-      //stop the player
-      player.stop()
-      //Send Success Message
-      return message.channel.send(new MessageEmbed()
-        .setDescription(`⏭ Skipped \`${Number(args[0] - 1)}\` songs`)
-        .setColor("GREEN")
-      );
-    } catch (e) {
-      console.log(String(e.stack).bgRed)
-      client.sendError(
-        message.channel,
-        "Something went wrong."
-      );
-    }
-  },
-  SlashCommand: {
-    options: [
-      {
-          name: "number",
-          value: "[number]",
-          type: 4,
-          required: true,
-          description: "Remove a song from the queue",
-      },
-  ],
-  /**
-   *
-   * @param {import("../structures/DiscordMusicBot")} client
-   * @param {import("discord.js").Message} message
-   * @param {string[]} args
-   * @param {*} param3
-   */
-   run: async (client, interaction, args, { GuildDB }) => {
-
-    const player = client.Manager.create({
-      guild: interaction.guild_id,
-      voiceChannel: interaction.member.voice.channel.id,
-      textChannel: interaction.channel.id,
-      selfDeafen: false,
-    });
-
-    try {
-      if (!args[0])
-        return interaction.send(new MessageEmbed()
-          .setColor("GREEN")
-          .setDescription(`**Usage**: \`${GuildDB.prefix}skipto <number>\``)
-        );
-      //if the wished track is bigger then the Queue Size
-      if (Number(args[0]) > player.queue.size)
-        return interaction.send(new MessageEmbed()
-          .setColor("GREEN")
-          .setTitle(`❌ | That song is not in the queue! Please try again!`)
-        );
-      //remove all tracks to the jumped song
-      player.queue.remove(0, Number(args[0]) - 1);
-      //stop the player
-      player.stop()
-      //Send Success Message
-      return interaction.send(new MessageEmbed()
-        .setDescription(`⏭ Skipped \`${Number(args[0])}\` songs`)
-        .setColor("GREEN")
-      );
-    } catch (e) {
-      console.log(String(e.stack).bgRed)
-      client.sendError(
-        interaction,
-        "Something went wrong."
-      );
-    }
-  },
-  }
-};

+ 0 - 61
bot/commands/volume.js

@@ -1,61 +0,0 @@
-const { MessageEmbed } = require("discord.js");
-const { TrackUtils } = require("erela.js");
-
-module.exports = {
-    name: "volume",
-    description: "Changes the Volume",
-    usage: "<volume>",
-    permissions: {
-        channel: ["VIEW_CHANNEL", "SEND_MESSAGES", "EMBED_LINKS"],
-        member: [],
-    },
-    aliases: ["vol", "v"],
-    /**
-     *
-     * @param {import("../structures/DiscordMusicBot")} client
-     * @param {import("discord.js").Message} message
-     * @param {string[]} args
-     * @param {*} param3
-     */
-    run: async (client, message, args, { GuildDB }) => {
-        let player = await client.Manager.get(message.guild.id);
-        if (!player) return client.sendTime(message.channel, "❌ | **Nothing is playing right now...**");
-        if (!message.member.voice.channel) return client.sendTime(message.channel, "❌ | **You must be in a voice channel to use this command!**");
-        if (!parseInt(args[0])) return message.channel.send("Please choose between 1 - 100");
-        let vol = parseInt(args[0]);
-        player.setVolume(vol);
-        message.channel.send(`🔉 | Volume set to \`${player.volume}\``);
-    },
-    SlashCommand: {
-        options: [
-            {
-                name: "number",
-                value: "number 1 - 100",
-                type: 4,
-                required: true,
-                description: "What do you want to change the volume to?",
-            },
-        ],
-    /**
-     *
-     * @param {import("../structures/DiscordMusicBot")} client
-     * @param {import("discord.js").Message} message
-     * @param {string[]} args
-     * @param {*} param3
-     */
-        run: async (client, interaction, args, { GuildDB }) => {
-            const guild = client.guilds.cache.get(interaction.guild_id);
-            const member = guild.members.cache.get(interaction.member.user.id);
-
-            if (!member.voice.channel) return client.sendTime(interaction, "❌ | You must be in a voice channel to use this command.");
-            if (guild.me.voice.channel && !guild.me.voice.channel.equals(member.voice.channel)) return client.sendTime(interaction, `❌ | You must be in ${guild.me.voice.channel} to use this command.`);
-            let player = await client.Manager.get(interaction.guild_id);
-            if (!player) return client.sendTime(interaction, "❌ | **Nothing is playing right now...**");
-            if (!args.length) return client.sendTime(interaction, `🔉 | Current volume \`${player.volume}\`.`);
-            let vol = parseInt(args[0].value);
-            if (!vol || vol < 1 || vol > 100) return client.sendTime(interaction, `Please choose between \`1 - 100\``);
-            player.setVolume(vol);
-            client.sendTime(interaction, `🔉 | Volume set to \`${player.volume}\``);
-        },
-    },
-};

+ 0 - 30
bot/config.js

@@ -1,30 +0,0 @@
-module.exports = {
-  Admins: ["622846126713995305", "816425070570242128"], //Admins of the bot
-  DefaultPrefix: "=", //Default prefix, Server Admins can change the prefix
-  Port: 3000, //Which port website gonna be hosted
-  SupportServer: "https://discord.io/rrv_team", //Support Server Link
-  Token: "ODQwNTg3MzQ2MjA5ODAwMjAz.YJaX-A.zb9dgNeeUR2Fg33cyp6PcYBhQKc" || process.env.Token, //Discord Bot Token
-  ClientID: "840587346209800203", //Discord Client ID
-  ClientSecret: "cMy1Wp_CHwDt7Y8xImLsoVIJ-8kmO4a1", //Discord Client Secret
-  Scopes: ["identify", "guilds", "applications.commands"], //Discord OAuth2 Scopes
-  CallbackURL: "/api/callback", //Discord OAuth2 Callback URL
-  "24/7": true, //If you want the bot to be stay in the vc 24/7
-  CookieSecret: "dexter-made-it", //A Secret like a password
-  IconURL:
-    "https://raw.githubusercontent.com/SudhanPlayz/Discord-MusicBot/master/assets/Music.gif", //URL of all embed author icons | Dont edit unless you dont need that Music CD Spining
-  Permissions: 2205280576, //Bot Inviting Permissions
-  Website: "http://locallhost", //Website where it was hosted at includes http or https || Use "0.0.0.0" if you using Heroku
-
-  Lavalink: {
-    id: "Main",
-    host: "node3.rockbusterhostings.in.net",
-    port: 65535,
-    pass: "pass134",
-  },
-
-  //Please go to https://developer.spotify.com/dashboard/
-  Spotify: {
-    ClientID: "ce33a4196e0745e4819b938c1ec9eb54", //Spotify Client ID
-    ClientSecret: "a27f5ff64e214a7f9a3714f4b0f79cfd", //Spotify Client Secret
-  },
-};

+ 0 - 49
bot/development.md

@@ -1,49 +0,0 @@
-# Development
-
-This may help you if you are editing this script
-
-## Structures(Folders)
-
-/api - Website, Socket and routes
-/assets - Images and other stuff will be public
-/commands - Bot commands and slash commands
-/events - Client events
-/structures - Classes
-/util - Extra stuffs
-/views - Page Rendering/Website
-
-## Permissions
-
-Permissions to add in commands to check them that it is available or not
-
-`ADMINISTRATOR` (implicitly has _all_ permissions, and bypasses all channel overwrites)
-`CREATE_INSTANT_INVITE` (create invitations to the guild)
-`KICK_MEMBERS`
-`BAN_MEMBERS`
-`MANAGE_CHANNELS` (edit and reorder channels)
-`MANAGE_GUILD` (edit the guild information, region, etc.)
-`ADD_REACTIONS` (add new reactions to messages)
-`VIEW_AUDIT_LOG`
-`PRIORITY_SPEAKER`
-`STREAM`
-`VIEW_CHANNEL`
-`SEND_MESSAGES`
-`SEND_TTS_MESSAGES`
-`MANAGE_MESSAGES` (delete messages and reactions)
-`EMBED_LINKS` (links posted will have a preview embedded)
-`ATTACH_FILES`
-`READ_MESSAGE_HISTORY` (view messages that were posted prior to opening Discord)
-`MENTION_EVERYONE`
-`USE_EXTERNAL_EMOJIS` (use emojis from different guilds)
-`VIEW_GUILD_INSIGHTS`
-`CONNECT` (connect to a voice channel)
-`SPEAK` (speak in a voice channel)
-`MUTE_MEMBERS` (mute members across all voice channels)
-`DEAFEN_MEMBERS` (deafen members across all voice channels)
-`MOVE_MEMBERS` (move members between voice channels)
-`USE_VAD` (use voice activity detection)
-`CHANGE_NICKNAME`
-`MANAGE_NICKNAMES` (change other members' nicknames)
-`MANAGE_ROLES`
-`MANAGE_WEBHOOKS`
-`MANAGE_EMOJIS`

+ 0 - 3
bot/events/guildCreate.js

@@ -1,3 +0,0 @@
-module.exports = (client, guild) => {
-  require("../util/RegisterSlashCommands")(client, guild.id);
-};

+ 0 - 70
bot/events/message.js

@@ -1,70 +0,0 @@
-/**
- *
- * @param {require("../structures/DiscordMusicBot")} client
- * @param {require("discord.js").Message} message
- * @returns {void} aka: nothing ;-;
- */
-
-module.exports = async (client, message) => {
-  if (message.author.bot || message.channel.type === "dm") return;
-  let prefix = client.config.DefaultPrefix;
-
-  let GuildDB = await client.GetGuild(message.guild.id);
-  if (GuildDB && GuildDB.prefix) prefix = GuildDB.prefix;
-
-  //Initialize GuildDB
-  if (!GuildDB) {
-    await client.database.guild.set(message.guild.id, {
-      prefix: prefix,
-      DJ: null,
-    });
-    GuildDB = await client.GetGuild(message.guild.id);
-  }
-
-  //Prefixes also have mention match
-  const prefixMention = new RegExp(`^<@!?${client.user.id}> `);
-  prefix = message.content.match(prefixMention)
-    ? message.content.match(prefixMention)[0]
-    : prefix;
-
-  if (message.content.indexOf(prefix) !== 0) return;
-
-  const args = message.content.slice(prefix.length).trim().split(/ +/g);
-  //Making the command lowerCase because our file name will be in lowerCase
-  const command = args.shift().toLowerCase();
-
-  //Searching a command
-  const cmd =
-    client.commands.get(command) ||
-    client.commands.find((x) => x.aliases && x.aliases.includes(command));
-
-  //Executing the codes when we get the command or aliases
-  if (cmd) {
-    if (
-      (cmd.permissions &&
-        cmd.permissions.channel &&
-        !message.channel
-          .permissionsFor(client.user)
-          .has(cmd.permissions.channel)) ||
-      (cmd.permissions &&
-        cmd.permissions.member &&
-        !message.channel
-          .permissionsFor(message.member)
-          .has(cmd.permissions.member)) ||
-      (cmd.permissions &&
-        GuildDB.DJ &&
-        !message.channel
-          .permissionsFor(message.member)
-          .has(["ADMINISTRATOR"]) &&
-        !message.member.roles.cache.has(GuildDB.DJ))
-    )
-      return client.sendError(
-        message.channel,
-        "Missing Permissions!" + GuildDB.DJ
-          ? " You need the `DJ` role to access this command."
-          : ""
-      );
-    cmd.run(client, message, args, { GuildDB });
-    client.CommandsRan++;
-  } else return;
-};

+ 0 - 4
bot/events/raw.js

@@ -1,4 +0,0 @@
-module.exports = (client, data) => {
-  //What is data? Discord Gateway Data, Please check discord api docs
-  client.Manager.updateVoiceState(data);
-};

+ 0 - 8
bot/events/ready.js

@@ -1,8 +0,0 @@
-module.exports = async (client) => {
-  client.Ready = true;
-  client.user.setActivity("Music", { type: "LISTENING" }).then(() => {
-    client.Manager.init(client.user.id);
-    client.log("Successfully Logged in as " + client.user.tag);
-  });
-  client.RegisterSlashCommands();
-};

+ 0 - 6
bot/index.js

@@ -1,6 +0,0 @@
-const DiscordMusicBot = require("./structures/DiscordMusicBot");
-const client = new DiscordMusicBot();
-
-client.build();
-
-module.exports = client; //;-;

+ 0 - 52
bot/package.json

@@ -1,52 +0,0 @@
-{
-  "name": "discord-musicbot",
-  "version": "4.0.0",
-  "description": "Very simple discord music bot with the discord.js with Song Name playing. It can able to play music with the song name",
-  "main": "index.js",
-  "scripts": {
-    "install-node-v14": "wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.2/install.sh | bash && export NVM_DIR=\"$([ -z \"${XDG_CONFIG_HOME-}\" ] && printf %s \"${HOME}/.nvm\" || printf %s \"${XDG_CONFIG_HOME}/nvm\")\" && [ -s \"$NVM_DIR/nvm.sh\" ] && \\. \"$NVM_DIR/nvm.sh\" && nvm install 14 && nvm use 14",
-    "start": "node index",
-    "rm-logs": "rm Logs.log"
-  },
-  "repository": {
-    "type": "git",
-    "url": "git+https://github.com/SudhanPlayz/Discord-MusicBot.git"
-  },
-  "engines": {
-    "node": "14.x"
-  },
-  "keywords": [
-    "discord",
-    "discord-bot",
-    "discord-musicbot",
-    "music",
-    "discord-music"
-  ],
-  "author": "SudhanPlayz",
-  "license": "SEE LICENSE IN LICENSE",
-  "bugs": {
-    "url": "https://github.com/SudhanPlayz/Discord-MusicBot/issues"
-  },
-  "homepage": "https://github.com/SudhanPlayz/Discord-MusicBot#readme",
-  "dependencies": {
-    "colors": "^1.4.0",
-    "discord.js": "^12.5.3",
-    "erela.js": "^2.3.2",
-    "express": "^4.17.1",
-    "express-session": "^1.17.1",
-    "jsoning": "^0.8.15",
-    "lavasfy": "^2.1.2",
-    "lodash": "^4.17.21",
-    "lyrics-finder": "^21.7.0",
-    "mongoose": "^5.12.3",
-    "node-fetch": "^2.6.1",
-    "passport": "^0.4.1",
-    "passport-discord": "^0.1.4",
-    "pretty-ms": "^7.0.1",
-    "socket.io": "^4.0.1",
-    "winston": "^3.3.3"
-  },
-  "devDependencies": {
-    "prettier": "2.2.1"
-  }
-}

+ 0 - 256
bot/structures/DiscordMusicBot.js

@@ -1,256 +0,0 @@
-const { Collection, Client, MessageEmbed } = require("discord.js");
-const { LavasfyClient } = require("lavasfy");
-const { Manager } = require("erela.js");
-const { Server } = require("socket.io");
-const http = require("http");
-const Jsoning = require("jsoning");
-const fs = require("fs");
-const path = require("path");
-const Express = require("express");
-const Logger = require("./Logger");
-const prettyMilliseconds = require("pretty-ms");
-
-//Class extending Stuff
-require("./EpicPlayer"); //idk why im doing but i wanna learn something new so...
-
-class DiscordMusicBot extends Client {
-  constructor(props) {
-    super(props);
-
-    this.commands = new Collection();
-    this.connections = new Map();
-    this.CommandsRan = 0;
-    this.SongsPlayed = 0;
-
-    this.database = {
-      //Saved at jsoning node_modules directory, DOCS: https://jsoning.js.org/
-      guild: new Jsoning("guild.json"), //Server Config
-    };
-    this.logger = new Logger(path.join(__dirname, "..", "Logs.log"));
-
-    try {
-      //Config for testing
-      this.config = require("../dev-config");
-    } catch {
-      //Config for production
-      this.config = require("../config");
-    }
-    if (this.config.Token === "")
-      return new TypeError(
-        "Please fill in the information in the config.js file."
-      );
-
-    this.LoadCommands();
-    this.LoadEvents();
-
-    //Web Stuff
-    this.server = Express();
-    this.http = http.createServer(this.server);
-    this.server.use("/", require("../api"));
-    this.io = new Server(this.http);
-    require("../api/socket")(this.io);
-
-    //Utils
-    this.ProgressBar = require("../util/ProgressBar");
-    this.Pagination = require("../util/pagination");
-    this.ParseHumanTime = (str) => {
-      let Parsed;
-      try {
-        Parsed = require("../util/TimeString")(str);
-        return Parsed;
-      } catch {
-        Parsed = false;
-        return Parsed;
-      }
-    };
-
-    this.Ready = false;
-
-    //idk where do i do it so i did it here ;-;
-    this.ws.on("INTERACTION_CREATE", async (interaction) => {
-      let GuildDB = await this.GetGuild(interaction.guild_id);
-
-      //Initialize GuildDB
-      if (!GuildDB) {
-        await this.database.guild.set(message.guild.id, {
-          prefix: prefix,
-          DJ: null,
-        });
-        GuildDB = await this.GetGuild(message.guild.id);
-      }
-
-      const command = interaction.data.name.toLowerCase();
-      const args = interaction.data.options;
-
-      //Easy to send respnose so ;)
-      interaction.guild = await this.guilds.fetch(interaction.guild_id);
-      interaction.send = async (message) => {
-        return await this.api
-          .interactions(interaction.id, interaction.token)
-          .callback.post({
-            data: {
-              type: 4,
-              data:
-                typeof message == "string"
-                  ? { content: message }
-                  : message.type && message.type === "rich"
-                  ? { embeds: [message] }
-                  : message,
-            },
-          });
-      };
-
-      let cmd = client.commands.get(command);
-      if (cmd.SlashCommand && cmd.SlashCommand.run)
-        cmd.SlashCommand.run(this, interaction, args, { GuildDB });
-    });
-
-    //because not worked lol ;-;
-    const client = this;
-
-    this.Lavasfy = new LavasfyClient(
-      {
-        clientID: this.config.Spotify.ClientID,
-        clientSecret: this.config.Spotify.ClientSecret,
-      },
-      [
-        {
-          id: this.config.Lavalink.id,
-          host: this.config.Lavalink.host,
-          port: this.config.Lavalink.port,
-          password: this.config.Lavalink.pass,
-        },
-      ]
-    );
-
-    this.Manager = new Manager({
-      nodes: [
-        {
-          identifier: this.config.Lavalink.id,
-          host: this.config.Lavalink.host,
-          port: this.config.Lavalink.port,
-          password: this.config.Lavalink.pass,
-        },
-      ],
-      send(id, payload) {
-        const guild = client.guilds.cache.get(id);
-        if (guild) guild.shard.send(payload);
-      },
-    })
-      .on("nodeConnect", (node) =>
-        this.log(`Lavalink: Node ${node.options.identifier} connected`)
-      )
-      .on("nodeError", (node, error) =>
-        this.log(
-          `Lavalink: Node ${node.options.identifier} had an error: ${error.message}`
-        )
-      )
-      .on("trackStart", async (player, track) => {
-        this.SongsPlayed++;
-        let TrackStartedEmbed = new MessageEmbed()
-          .setAuthor(`Now playing ♪`, this.config.IconURL)
-          .setThumbnail(player.queue.current.displayThumbnail())
-          .setDescription(`[${track.title}](${track.uri})`)
-          .addField("Requested by", `${track.requester}`, true)
-          .addField(
-            "Duration",
-            `\`${prettyMilliseconds(track.duration, {
-              colonNotation: true,
-            })}\``,
-            true
-          )
-          .setColor("RANDOM");
-        //.setFooter("Started playing at");
-        let NowPlaying = await client.channels.cache
-          .get(player.textChannel)
-          .send(TrackStartedEmbed);
-        player.setNowplayingMessage(NowPlaying);
-      })
-      .on("queueEnd", (player) => {
-        let QueueEmbed = new MessageEmbed()
-          .setAuthor("The queue has ended", this.config.IconURL)
-          .setColor("RANDOM")
-          .setTimestamp();
-        client.channels.cache.get(player.textChannel).send(QueueEmbed);
-        if (!this.config["24/7"]) player.destroy();
-      });
-  }
-
-  LoadCommands() {
-    let CommandsDir = path.join(__dirname, "..", "commands");
-    fs.readdir(CommandsDir, (err, files) => {
-      if (err) this.log(err);
-      else
-        files.forEach((file) => {
-          let cmd = require(CommandsDir + "/" + file);
-          if (!cmd.name || !cmd.description || !cmd.run)
-            return this.log(
-              "Unable to load Command: " +
-                file.split(".")[0] +
-                ", Reason: File doesn't had run/name/desciption"
-            );
-          this.commands.set(file.split(".")[0], cmd);
-          this.log("Command Loaded: " + file.split(".")[0]);
-        });
-    });
-  }
-
-  LoadEvents() {
-    let EventsDir = path.join(__dirname, "..", "events");
-    fs.readdir(EventsDir, (err, files) => {
-      if (err) this.log(err);
-      else
-        files.forEach((file) => {
-          const event = require(EventsDir + "/" + file);
-          this.on(file.split(".")[0], event.bind(null, this));
-          this.logger.log("Event Loaded: " + file.split(".")[0]);
-        });
-    });
-  }
-
-  async GetGuild(GuildID) {
-    return new Promise(async (res, rej) => {
-      let guild = await this.database.guild
-        .get(GuildID)
-        .catch((err) => rej(err));
-      res(guild);
-    });
-  }
-
-  log(Text) {
-    this.logger.log(Text);
-  }
-
-  sendError(Channel, Error) {
-    let embed = new MessageEmbed()
-      .setTitle("An error occured")
-      .setColor("RED")
-      .setDescription(Error)
-      .setFooter(
-        "If you think this as a bug, please report it in the support server!"
-      );
-
-    Channel.send(embed);
-  }
-
-  sendTime(Channel, Error) {
-    let embed = new MessageEmbed().setColor("RANDOM").setDescription(Error);
-
-    Channel.send(embed);
-  }
-
-  build() {
-    this.login(this.config.Token);
-    this.http.listen(process.env.PORT || this.config.Port, () =>
-      this.log("Web Server has been started")
-    );
-  }
-
-  RegisterSlashCommands() {
-    this.guilds.cache.forEach((guild) => {
-      require("../util/RegisterSlashCommands")(this, guild.id);
-    });
-  }
-}
-
-module.exports = DiscordMusicBot;

+ 0 - 17
bot/structures/EpicPlayer.js

@@ -1,17 +0,0 @@
-const { Message } = require("discord.js");
-const { Structure } = require("erela.js");
-
-Structure.extend(
-  "Player",
-  (Player) =>
-    class extends Player {
-      /**
-       * Sets now playing message for deleting next time
-       * @param {Message} message
-       */
-      setNowplayingMessage(message) {
-        if (this.nowPlayingMessage) this.nowPlayingMessage.delete();
-        return (this.nowPlayingMessage = message);
-      }
-    }
-);

+ 0 - 28
bot/structures/Logger.js

@@ -1,28 +0,0 @@
-const winston = require("winston");
-const colors = require("colors");
-
-class Logger {
-  constructor(LoggingFile) {
-    this.logger = winston.createLogger({
-      transports: [new winston.transports.File({ filename: LoggingFile })],
-    });
-  }
-
-  log(Text) {
-    let d = new Date();
-    this.logger.log({
-      level: "info",
-      message:
-        `${d.getHours()}:${
-          d.getMinutes
-        } - ${d.getDate()}:${d.getMonth()}:${d.getFullYear()} | Info: ` + Text,
-    });
-    console.log(
-      colors.green(
-        `${d.getDate()}:${d.getMonth()}:${d.getFullYear()} - ${d.getHours()}:${d.getMinutes()}`
-      ) + colors.yellow(" | Info: " + Text)
-    );
-  }
-}
-
-module.exports = Logger;

+ 0 - 19
bot/util/ProgressBar.js

@@ -1,19 +0,0 @@
-/**
- * Create a text progress bar
- * @param {Number} value - The value to fill the bar
- * @param {Number} maxValue - The max value of the bar
- * @param {Number} size - The bar size (in letters)
- * @return {{Bar: string, percentageText: string}} - The bar
- */
-module.exports = (value, maxValue, size) => {
-  const percentage = value / maxValue; // Calculate the percentage of the bar
-  const progress = Math.round(size * percentage); // Calculate the number of square caracters to fill the progress side.
-  const emptyProgress = size - progress; // Calculate the number of dash caracters to fill the empty progress side.
-
-  const progressText = "▇".repeat(progress); // Repeat is creating a string with progress * caracters in it
-  const emptyProgressText = "—".repeat(emptyProgress); // Repeat is creating a string with empty progress * caracters in it
-  const percentageText = Math.round(percentage * 100) + "%"; // Displaying the percentage of the bar
-
-  const Bar = progressText + emptyProgressText; // Creating the bar
-  return { Bar, percentageText };
-};

+ 0 - 48
bot/util/RegisterSlashCommands.js

@@ -1,48 +0,0 @@
-const fs = require("fs");
-const path = require("path");
-
-/**
- * Register slash commands for a guild
- * @param {require("../structures/DiscordMusicBot")} client
- * @param {string} guild
- */
-module.exports = (client, guild) => {
-  client.log("Registering slash commands for " + guild);
-
-  let commandsDir = path.join(__dirname, "..", "commands");
-
-  fs.readdir(commandsDir, (err, files) => {
-    if (err) throw err;
-    files.forEach(async (file) => {
-      let cmd = require(commandsDir + "/" + file);
-      if (!cmd.SlashCommand || !cmd.SlashCommand.run) return;
-      let dataStuff = {
-        name: cmd.name,
-        description: cmd.description,
-        options: cmd.SlashCommand.options,
-      };
-
-      //Creating variables like this, So you might understand my code :)
-      let ClientAPI = client.api.applications(client.user.id);
-      let GuildAPI = ClientAPI.guilds(guild);
-
-      client.log(
-        "[Slash Command]: [POST] Guild " +
-          guild +
-          ", Command: " +
-          dataStuff.name
-      );
-      try {
-        await GuildAPI.commands.post({ data: dataStuff });
-      } catch (e) {
-        client.log(
-          "[Slash Command]: [POST-FAILED] Guild " +
-            guild +
-            ", Command: " +
-            dataStuff.name
-        );
-        console.log(e);
-      }
-    });
-  });
-};

+ 0 - 139
bot/util/TimeString.js

@@ -1,139 +0,0 @@
-/**
- * Exports
- */
-
-module.exports = parseTimestring;
-
-/**
- * Default options to use when parsing a timestring
- *
- * @type {Object}
- */
-
-const DEFAULT_OPTS = {
-  hoursPerDay: 24,
-  daysPerWeek: 7,
-  weeksPerMonth: 4,
-  monthsPerYear: 12,
-  daysPerYear: 365.25,
-};
-
-/**
- * Map of accepted strings to unit
- *
- * @type {Object}
- */
-
-const UNIT_MAP = {
-  ms: ["ms", "milli", "millisecond", "milliseconds"],
-  s: ["s", "sec", "secs", "second", "seconds"],
-  m: ["m", "min", "mins", "minute", "minutes"],
-  h: ["h", "hr", "hrs", "hour", "hours"],
-  d: ["d", "day", "days"],
-  w: ["w", "week", "weeks"],
-  mth: ["mon", "mth", "mths", "month", "months"],
-  y: ["y", "yr", "yrs", "year", "years"],
-};
-
-/**
- * Parse a timestring
- *
- * @param   {string} string
- * @param   {string} returnUnit
- * @param   {Object} opts
- * @returns {number}
- */
-
-function parseTimestring(string, returnUnit, opts) {
-  opts = Object.assign({}, DEFAULT_OPTS, opts || {});
-
-  let totalSeconds = 0;
-  const unitValues = getUnitValues(opts);
-  const groups = string
-    .toLowerCase()
-    .replace(/[^.\w+-]+/g, "")
-    .match(/[-+]?[0-9.]+[a-z]+/g);
-
-  if (groups === null) {
-    throw new Error(`The string [${string}] could not be parsed by timestring`);
-  }
-
-  groups.forEach((group) => {
-    const value = group.match(/[0-9.]+/g)[0];
-    const unit = group.match(/[a-z]+/g)[0];
-
-    totalSeconds += getSeconds(value, unit, unitValues);
-  });
-
-  if (returnUnit) {
-    return convert(totalSeconds, returnUnit, unitValues);
-  }
-
-  return totalSeconds;
-}
-
-/**
- * Get unit values based on the passed options
- *
- * @param   {Object} opts
- * @returns {Object}
- */
-
-function getUnitValues(opts) {
-  const unitValues = {
-    ms: 0.001,
-    s: 1,
-    m: 60,
-    h: 3600,
-  };
-
-  unitValues.d = opts.hoursPerDay * unitValues.h;
-  unitValues.w = opts.daysPerWeek * unitValues.d;
-  unitValues.mth = (opts.daysPerYear / opts.monthsPerYear) * unitValues.d;
-  unitValues.y = opts.daysPerYear * unitValues.d;
-
-  return unitValues;
-}
-
-/**
- * Get the key for a unit
- *
- * @param   {string} unit
- * @returns {string}
- */
-
-function getUnitKey(unit) {
-  for (const key of Object.keys(UNIT_MAP)) {
-    if (UNIT_MAP[key].indexOf(unit) > -1) {
-      return key;
-    }
-  }
-
-  throw new Error(`The unit [${unit}] is not supported by timestring`);
-}
-
-/**
- *  Get the number of seconds for a value, based on the unit
- *
- * @param   {number} value
- * @param   {string} unit
- * @param   {Object} unitValues
- * @returns {number}
- */
-
-function getSeconds(value, unit, unitValues) {
-  return value * unitValues[getUnitKey(unit)];
-}
-
-/**
- * Convert a value from its existing unit to a new unit
- *
- * @param   {number} value
- * @param   {string} unit
- * @param   {Object} unitValues
- * @returns {number}
- */
-
-function convert(value, unit, unitValues) {
-  return value / unitValues[getUnitKey(unit)];
-}

+ 0 - 49
bot/util/pagination.js

@@ -1,49 +0,0 @@
-module.exports = async (
-  msg,
-  pages,
-  client,
-  emojiList = ["◀️", "⏹️", "▶️"],
-  timeout = 120000
-) => {
-  if (!msg && !msg.channel) throw new Error("Channel is inaccessible.");
-  if (!pages) throw new Error("Pages are not given.");
-
-  let page = 0;
-  const curPage = await msg.channel.send(
-    pages[page].setFooter(
-      `Page ${page + 1}/${pages.length} `,
-      msg.author.displayAvatarURL({ dynamic: true })
-    )
-  );
-  for (const emoji of emojiList) await curPage.react(emoji);
-  const reactionCollector = curPage.createReactionCollector(
-    (reaction, user) => emojiList.includes(reaction.emoji.name) && !user.bot,
-    { time: timeout }
-  );
-  reactionCollector.on("collect", (reaction) => {
-    reaction.users.remove(msg.author);
-    switch (reaction.emoji.name) {
-      case emojiList[0]:
-        page = page > 0 ? --page : pages.length - 1;
-        break;
-      case emojiList[1]:
-        curPage.reactions.removeAll();
-        break;
-      case emojiList[2]:
-        page = page + 1 < pages.length ? ++page : 0;
-        break;
-    }
-    curPage.edit(
-      pages[page].setFooter(
-        `Page ${page + 1}/${pages.length} `,
-        msg.author.displayAvatarURL({ dynamic: true })
-      )
-    );
-  });
-  reactionCollector.on("end", () => {
-    if (!curPage.deleted) {
-      curPage.reactions.removeAll();
-    }
-  });
-  return curPage;
-};

+ 0 - 297
bot/views/dashboard.html

@@ -1,297 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-  <head>
-    <meta charset="UTF-8" />
-    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
-    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
-    <title>Dashboard</title>
-    <link rel="shortcut icon" href="/logo.gif" type="image/gif" />
-    <link
-      href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta3/dist/css/bootstrap.min.css"
-      rel="stylesheet"
-      integrity="sha384-eOJMYsd53ii+scO/bJGFsiCZc+5NDVN2yr8+0RDqr0Ql0h+rP48ckxlpbzKgwra6"
-      crossorigin="anonymous"
-    />
-    <link
-      rel="stylesheet"
-      href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.11.2/css/all.min.css"
-    />
-    <link
-      rel="stylesheet"
-      href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.11.2/css/fontawesome.min.css"
-    />
-  </head>
-  <body>
-    <section class="main">
-      <!--Main Navigation-->
-      <header>
-        <!-- Sidebar -->
-        <nav id="sidebarMenu" class="collapse d-lg-block sidebar">
-          <div class="position-sticky">
-            <div class="list-group list-group-flush mx-3 mt-4">
-              <a
-                href="/dashboard"
-                class="list-group-item list-group-item-action py-2 ripple active"
-                aria-current="true"
-              >
-                <i class="fas fa-tachometer-alt fa-fw me-3"></i
-                ><span>Main dashboard</span>
-              </a>
-              <a
-                href="/servers"
-                class="list-group-item list-group-item-action py-2 ripple"
-              >
-                <i class="fas fa-server fa-fw me-3"></i
-                ><span>Manage Servers</span>
-              </a>
-              <a
-                href="/logout"
-                class="list-group-item list-group-item-action py-2 ripple"
-              >
-                <i class="fas fa-sign-out-alt fa-fw me-3"></i
-                ><span>Logout</span>
-              </a>
-            </div>
-          </div>
-        </nav>
-        <!-- Sidebar -->
-
-        <!-- Navbar -->
-        <nav
-          id="main-navbar"
-          class="navbar navbar-expand-lg navbar-light fixed-top"
-        >
-          <!-- Container wrapper -->
-          <div class="container-fluid">
-            <!-- Toggle button -->
-            <button
-              class="navbar-toggler"
-              type="button"
-              data-mdb-toggle="collapse"
-              data-mdb-target="#sidebarMenu"
-              aria-controls="sidebarMenu"
-              aria-expanded="false"
-              aria-label="Toggle navigation"
-              onclick="function re(){ let r = $('#sidebarMenu'); if(r.hasClass('collapse'))r.removeClass('collapse');else r.addClass('collapse')}re()"
-            >
-              <i class="fas fa-bars"></i>
-            </button>
-
-            <!-- Brand -->
-            <a class="navbar-brand text-white" href="/">
-              <img src="/logo.gif" height="40" alt="" loading="lazy" />
-              Dashboard
-            </a>
-          </div>
-        </nav>
-        <!-- Navbar -->
-      </header>
-      <!--Main Navigation-->
-
-      <!--Main layout-->
-      <main style="margin-top: 58px">
-        <div class="container pt-4">
-          <!--Section: Main-->
-          <section>
-            <h1>Bot Details</h1>
-            <div class="row">
-              <div class="col-xl-3 col-sm-6 col-12 mb-4">
-                <div class="card">
-                  <div class="card-body">
-                    <div class="d-flex justify-content-between px-md-1">
-                      <div>
-                        <h3 class="text-danger" id="commands"></h3>
-                        <p class="mb-0">Commands runned</p>
-                      </div>
-                      <div class="align-self-center">
-                        <i class="fas fa-rocket text-danger fa-3x"></i>
-                      </div>
-                    </div>
-                  </div>
-                </div>
-              </div>
-              <div class="col-xl-3 col-sm-6 col-12 mb-4">
-                <div class="card">
-                  <div class="card-body">
-                    <div class="d-flex justify-content-between px-md-1">
-                      <div>
-                        <h3 class="text-success" id="users">0</h3>
-                        <p class="mb-0">Users</p>
-                      </div>
-                      <div class="align-self-center">
-                        <i class="far fa-user text-success fa-3x"></i>
-                      </div>
-                    </div>
-                  </div>
-                </div>
-              </div>
-              <div class="col-xl-3 col-sm-6 col-12 mb-4">
-                <div class="card">
-                  <div class="card-body">
-                    <div class="d-flex justify-content-between px-md-1">
-                      <div>
-                        <h3 class="text-warning" id="guilds">0</h3>
-                        <p class="mb-0">Servers</p>
-                      </div>
-                      <div class="align-self-center">
-                        <i class="fas fa-server text-warning fa-3x"></i>
-                      </div>
-                    </div>
-                  </div>
-                </div>
-              </div>
-              <div class="col-xl-3 col-sm-6 col-12 mb-4">
-                <div class="card">
-                  <div class="card-body">
-                    <div class="d-flex justify-content-between px-md-1">
-                      <div>
-                        <h3 class="text-info" id="songs">0</h3>
-                        <p class="mb-0">Songs played</p>
-                      </div>
-                      <div class="align-self-center">
-                        <i class="fas fa-music text-info fa-3x"></i>
-                      </div>
-                    </div>
-                  </div>
-                </div>
-              </div>
-            </div>
-          </section>
-          <!-- Footer -->
-          <div class="footer">
-            <div class="container">
-              <div class="row">
-                <div class="col-md-12">
-                  <div class="copyright-text">
-                    <p>
-                      © 2021
-                      <a href="//github.com/SudhanPlayz/Discord-MusicBot"
-                        >Discord Music Bot</a
-                      >. All rights reserved. Made by
-                      <a href="//github.com/SudhanPlayz">Sudhan</a> and its
-                      <a
-                        href="//github.com/SudhanPlayz/Discord-MusicBot/graphs/contributors"
-                        >contributers</a
-                      >
-                    </p>
-                  </div>
-                </div>
-              </div>
-            </div>
-          </div>
-          <!-- End Footer -->
-        </div>
-      </main>
-      <!--Main layout-->
-    </section>
-    <script
-      src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta3/dist/js/bootstrap.bundle.min.js"
-      integrity="sha384-JEW9xMcG8R+pH31jmWH6WWP0WintQrMb4s7ZOdauHnUtxwoG2vI5DkLtS3qm9Ekf"
-      crossorigin="anonymous"
-    ></script>
-    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
-    <script src="https://cdn.socket.io/4.0.1/socket.io.min.js"></script>
-  </body>
-  <style>
-    body {
-      background: var(--bs-gray-dark);
-      color: #fff;
-      overflow-x: hidden;
-    }
-
-    @media (min-width: 991.98px) {
-      main {
-        padding-left: 240px;
-      }
-    }
-
-    /* Sidebar */
-    .sidebar {
-      position: fixed;
-      top: 0;
-      bottom: 0;
-      left: 0;
-      padding: 58px 0 0; /* Height of navbar */
-      box-shadow: 0 2px 5px 0 rgb(0 0 0 / 5%), 0 2px 10px 0 rgb(0 0 0 / 5%);
-      width: 240px;
-      z-index: 600;
-    }
-
-    @media (max-width: 991.98px) {
-      .sidebar {
-        width: 100%;
-      }
-    }
-    .sidebar .active {
-      border-radius: 5px;
-      box-shadow: 0 2px 5px 0 rgb(0 0 0 / 16%), 0 2px 10px 0 rgb(0 0 0 / 12%);
-    }
-
-    .sidebar-sticky {
-      position: relative;
-      top: 0;
-      height: calc(100vh - 48px);
-      padding-top: 0.5rem;
-      overflow-x: hidden;
-      overflow-y: auto;
-    }
-
-    .card {
-      color: black;
-    }
-
-    .footer {
-      position: absolute;
-      bottom: 0;
-      background: #192027;
-      text-align: center;
-      padding: 32px 0;
-      width: 85%;
-    }
-
-    .footer p {
-      margin: 0;
-      line-height: 26px;
-      font-size: 15px;
-      color: #999;
-    }
-
-    .footer p a {
-      color: #5867dd;
-      text-decoration: none;
-    }
-
-    .footer p a:hover {
-      color: #34bfa3;
-    }
-
-    ::-webkit-scrollbar {
-      width: 15px;
-    }
-
-    ::-webkit-scrollbar-track {
-      background: #192027;
-    }
-
-    ::-webkit-scrollbar-thumb {
-      background: #5867dd;
-      border-radius: 20px;
-    }
-
-    ::-webkit-scrollbar-thumb:hover {
-      background: #414ca1;
-    }
-  </style>
-  <script>
-    $(document).ready(() => {
-      var socket = io();
-      socket.emit("dashboard");
-      socket.on("dashboard", (data) => {
-        $("#commands").text(data.commands);
-        $("#users").text(data.users);
-        $("#songs").text(data.songs);
-        $("#guilds").text(data.guilds);
-      });
-    });
-  </script>
-</html>

+ 0 - 429
bot/views/index.html

@@ -1,429 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-  <head>
-    <meta charset="UTF-8" />
-    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
-    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
-    <title>Discord Music Bot</title>
-    <link rel="shortcut icon" href="/logo.gif" type="image/gif" />
-    <link
-      href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta3/dist/css/bootstrap.min.css"
-      rel="stylesheet"
-      integrity="sha384-eOJMYsd53ii+scO/bJGFsiCZc+5NDVN2yr8+0RDqr0Ql0h+rP48ckxlpbzKgwra6"
-      crossorigin="anonymous"
-    />
-    <link
-      rel="stylesheet"
-      href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.11.2/css/all.min.css"
-    />
-    <link
-      rel="stylesheet"
-      href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.11.2/css/fontawesome.min.css"
-    />
-  </head>
-  <body>
-    <section class="main">
-      <!-- Navbar -->
-      <nav class="navbar navbar-dark bg-dark">
-        <div class="container-fluid">
-          <a class="navbar-brand" href="#">
-            <img
-              src="/logo.gif"
-              alt="Music Bot Logo"
-              width="30"
-              height="30"
-              class="d-inline-block align-text-top"
-            />
-            Discord Music Bot
-          </a>
-          <button
-            class="navbar-toggler"
-            type="button"
-            data-bs-toggle="collapse"
-            data-bs-target="#navbarText"
-            aria-controls="navbarText"
-            aria-expanded="false"
-            aria-label="Toggle navigation"
-          >
-            <span class="navbar-toggler-icon"></span>
-          </button>
-          <div class="d-flex nav-links">
-            <div class="d-flex justify-content-center">
-              <a class="nav-link active" aria-current="page" href="/">Home</a>
-              <a class="nav-link" href="#features">Features</a>
-              <a class="nav-link" href="#commands">Commands</a>
-            </div>
-            <a
-              href="/dashboard"
-              class="btn btn-outline-success me-2"
-              type="button"
-            >
-              Dashboard
-            </a>
-          </div>
-          <div class="collapse navbar-collapse" id="navbarText">
-            <ul class="navbar-nav me-auto mb-2 mb-lg-0">
-              <li class="nav-item">
-                <a class="nav-link active" aria-current="page" href="/">Home</a>
-              </li>
-              <li class="nav-item">
-                <a class="nav-link" href="#features">Features</a>
-              </li>
-              <li class="nav-item">
-                <a class="nav-link" href="#commands">Commands</a>
-              </li>
-            </ul>
-          </div>
-        </div>
-      </nav>
-      <!-- End Navbar -->
-
-      <!-- Hero entry 👌 -->
-      <div class="hero">
-        <div id="hero" class="text-center">
-          <h1>Discord Music Bot</h1>
-          <p>
-            An advanced discord music bot, supports Spotify, Soundcloud, YouTube
-            with Shuffling, Volume Control and Web Dashboard!
-          </p>
-        </div>
-      </div>
-      <!-- End Hero -->
-
-      <!-- Features -->
-      <div id="features" class="section-features">
-        <div class="container">
-          <div class="row justify-content-center text-center">
-            <div class="col-md-10 col-lg-8">
-              <div class="header-section">
-                <h2 class="title">Exclusive <span>Features</span></h2>
-                <p class="description">
-                  There are many Features in discord music bot! Every awesome
-                  features of this bot has been descirbed below check it out 😉
-                </p>
-              </div>
-            </div>
-          </div>
-          <div class="row">
-            <div class="col-md-6 col-lg-4">
-              <div class="single-service">
-                <div class="part-1">
-                  <i class="fab fa-spotify"></i>
-                  <h3 class="title">Spotify, Sound Cloud, YouTube Support</h3>
-                </div>
-                <div class="part-2">
-                  <p class="description">
-                    Use your spotify playlist, youtube videos, yotube playlists
-                    and much more using this bot
-                  </p>
-                </div>
-              </div>
-            </div>
-            <div class="col-md-6 col-lg-4">
-              <div class="single-service">
-                <div class="part-1">
-                  <i class="fas fa-music"></i>
-                  <h3 class="title">Lag free music</h3>
-                </div>
-                <div class="part-2">
-                  <p class="description">
-                    Bot never lags while playing a song in a voice channel
-                  </p>
-                </div>
-              </div>
-            </div>
-            <div class="col-md-6 col-lg-4">
-              <div class="single-service">
-                <div class="part-1">
-                  <i class="fas fa-sliders-h"></i>
-                  <h3 class="title">Server Settings</h3>
-                </div>
-                <div class="part-2">
-                  <p class="description">
-                    Control your song looping song or queue, You can even change
-                    server prefix and server dj role
-                  </p>
-                </div>
-              </div>
-            </div>
-          </div>
-        </div>
-      </div>
-      <!-- End Features -->
-
-      <!-- Commands -->
-      <div class="commands" id="commands">
-        <div class="container">
-          <h2 class="title text-center">Commands</h2>
-          <table class="table table-dark">
-            <thead>
-              <tr>
-                <th scope="col">Command</th>
-                <th scope="col">Aliases</th>
-                <th scope="col">Usage</th>
-                <th scope="col">Description</th>
-              </tr>
-            </thead>
-            <tbody id="commands-body"></tbody>
-          </table>
-        </div>
-      </div>
-      <!-- End Commands -->
-      <!-- Footer -->
-      <div class="footer">
-        <div class="container">
-          <div class="row">
-            <div class="col-md-12">
-              <div class="copyright-text">
-                <p>
-                  © 2021
-                  <a href="//github.com/SudhanPlayz/Discord-MusicBot"
-                    >Discord Music Bot</a
-                  >. All rights reserved. Made by
-                  <a href="//github.com/SudhanPlayz">Sudhan</a> and its
-                  <a
-                    href="//github.com/SudhanPlayz/Discord-MusicBot/graphs/contributors"
-                    >contributers</a
-                  >
-                </p>
-              </div>
-            </div>
-          </div>
-        </div>
-      </div>
-      <!-- End Footer -->
-    </section>
-    <script
-      src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta3/dist/js/bootstrap.bundle.min.js"
-      integrity="sha384-JEW9xMcG8R+pH31jmWH6WWP0WintQrMb4s7ZOdauHnUtxwoG2vI5DkLtS3qm9Ekf"
-      crossorigin="anonymous"
-    ></script>
-    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
-  </body>
-  <style>
-    body {
-      background: var(--bs-gray-dark);
-      color: #fff;
-    }
-
-    .navbar-toggler {
-      display: none;
-    }
-
-    .hero {
-      margin-top: 5%;
-    }
-
-    .commands {
-      margin-top: 100px;
-    }
-
-    .commands .title {
-      position: relative;
-      margin-bottom: 40px;
-      padding-bottom: 25px;
-      text-transform: uppercase;
-      font-weight: 700;
-      color: white;
-    }
-
-    .commands .title:before {
-      content: "";
-      position: absolute;
-      bottom: 0;
-      left: 50%;
-      transform: translateX(-50%);
-      width: 140px;
-      height: 1px;
-      background-color: #f70037;
-    }
-
-    .commands .title:after {
-      content: "";
-      position: absolute;
-      bottom: -1px;
-      left: 50%;
-      transform: translateX(-50%);
-      width: 45px;
-      height: 3px;
-      background-color: #f70037;
-    }
-
-    @media only screen and (max-width: 630px) {
-      .navbar-toggler {
-        display: inherit;
-      }
-
-      .nav-links {
-        display: none !important;
-      }
-    }
-
-    #features {
-      margin-top: 100px;
-    }
-
-    .section-features {
-      padding-top: 110px;
-      padding-bottom: 120px;
-      background-color: #211f24;
-      color: #fff;
-    }
-
-    .section-features .header-section {
-      margin-bottom: 35px;
-    }
-
-    .section-features .header-section .title {
-      position: relative;
-      margin-bottom: 40px;
-      padding-bottom: 25px;
-      text-transform: uppercase;
-      font-weight: 700;
-    }
-
-    .section-features .header-section .title:before {
-      content: "";
-      position: absolute;
-      bottom: 0;
-      left: 50%;
-      transform: translateX(-50%);
-      width: 140px;
-      height: 1px;
-      background-color: #f70037;
-    }
-
-    .section-features .header-section .title:after {
-      content: "";
-      position: absolute;
-      bottom: -1px;
-      left: 50%;
-      transform: translateX(-50%);
-      width: 45px;
-      height: 3px;
-      background-color: #f70037;
-    }
-
-    .section-features .header-section .title span {
-      color: #f70037;
-    }
-
-    .section-features .header-section .description {
-      color: #6f6f71;
-    }
-
-    .section-features .single-service {
-      margin-top: 40px;
-      background-color: #24252a;
-      box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.1);
-    }
-
-    .section-features .single-service .part-1 {
-      padding: 40px 40px 25px;
-      border-bottom: 2px solid #1d1e23;
-    }
-
-    .section-features .single-service .part-1 i {
-      margin-bottom: 25px;
-      font-size: 50px;
-      color: #f70037;
-    }
-
-    .section-features .single-service .part-1 .title {
-      font-size: 17px;
-      font-weight: 700;
-      letter-spacing: 0.02em;
-      line-height: 1.8em;
-    }
-
-    .section-features .single-service .part-2 {
-      padding: 30px 40px 40px;
-    }
-
-    .section-features .single-service .part-2 .description {
-      margin-bottom: 22px;
-      color: #6f6f71;
-      font-size: 14px;
-      line-height: 1.8em;
-    }
-
-    .section-features .single-service .part-2 a {
-      color: #fff;
-      font-size: 14px;
-      text-decoration: none;
-    }
-
-    .section-features .single-service .part-2 a i {
-      margin-right: 10px;
-      color: #f70037;
-    }
-
-    .footer {
-      background: #192027;
-      text-align: center;
-      padding: 32px 0;
-    }
-
-    .footer p {
-      margin: 0;
-      line-height: 26px;
-      font-size: 15px;
-      color: #999;
-    }
-
-    .footer p a {
-      color: #5867dd;
-      text-decoration: none;
-    }
-
-    .footer p a:hover {
-      color: #34bfa3;
-    }
-
-    ::-webkit-scrollbar {
-      width: 15px;
-    }
-
-    ::-webkit-scrollbar-track {
-      background: #192027;
-    }
-
-    ::-webkit-scrollbar-thumb {
-      background: #5867dd;
-      border-radius: 20px;
-    }
-
-    ::-webkit-scrollbar-thumb:hover {
-      background: #414ca1;
-    }
-  </style>
-  <script>
-    $(document).ready(() => {
-      $.get("/api/info", (data) => {
-        //check api/routes.js
-        let url = `https://discord.com/oauth2/authorize?client_id=${
-          data.ClientID
-        }&permissions=${data.Permissions}&scope=bot%20${data.Scopes.join(
-          "%20"
-        )}&redirect_uri=${data.Website}${data.CallbackURL}&response_type=code`;
-        $("#hero")
-          .append(`<a href="${url}" class="btn btn-primary" type="button">Invite</a>
-            <a href="/dashboard" class="btn btn-outline-primary" type="button">Dashboard</a>`);
-      });
-
-      $.get("/api/commands", (data) => {
-        //same as above check it :eyes:
-        data.commands.forEach((cmd) => {
-          $("#commands-body").append(`
-<tr>
-  <th scope="row">${cmd.name}</th>
-  <td>${cmd.aliases ? cmd.aliases.join(", ") : "None"}</td>
-  <td>${cmd.usage ? cmd.usage : "None"}</td>
-  <td>${cmd.description ? cmd.description : "None"}</td>
-</tr>
-`);
-        });
-      });
-    });
-  </script>
-</html>

+ 0 - 348
bot/views/server.html

@@ -1,348 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-  <head>
-    <meta charset="UTF-8" />
-    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
-    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
-    <title>Dashboard - Server</title>
-    <link rel="shortcut icon" href="/logo.gif" type="image/gif" />
-    <link
-      href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta3/dist/css/bootstrap.min.css"
-      rel="stylesheet"
-      integrity="sha384-eOJMYsd53ii+scO/bJGFsiCZc+5NDVN2yr8+0RDqr0Ql0h+rP48ckxlpbzKgwra6"
-      crossorigin="anonymous"
-    />
-    <link
-      rel="stylesheet"
-      href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.11.2/css/all.min.css"
-    />
-    <link
-      rel="stylesheet"
-      href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.11.2/css/fontawesome.min.css"
-    />
-  </head>
-  <body>
-    <section class="main">
-      <!--Main Navigation-->
-      <header>
-        <!-- Sidebar -->
-        <nav id="sidebarMenu" class="collapse d-lg-block sidebar collapse">
-          <div class="position-sticky">
-            <div class="list-group list-group-flush mx-3 mt-4">
-              <a
-                href="/dashboard"
-                class="list-group-item list-group-item-action py-2 ripple"
-                aria-current="true"
-              >
-                <i class="fas fa-tachometer-alt fa-fw me-3"></i
-                ><span>Main dashboard</span>
-              </a>
-              <a
-                href="/servers"
-                class="list-group-item list-group-item-action py-2 ripple"
-              >
-                <i class="fas fa-server fa-fw me-3"></i
-                ><span>Manage Servers</span>
-              </a>
-              <a
-                href="/logout"
-                class="list-group-item list-group-item-action py-2 ripple"
-              >
-                <i class="fas fa-sign-out-alt fa-fw me-3"></i
-                ><span>Logout</span>
-              </a>
-            </div>
-          </div>
-        </nav>
-        <!-- Sidebar -->
-
-        <!-- Navbar -->
-        <nav
-          id="main-navbar"
-          class="navbar navbar-expand-lg navbar-light fixed-top"
-        >
-          <!-- Container wrapper -->
-          <div class="container-fluid">
-            <!-- Toggle button -->
-            <button
-              class="navbar-toggler"
-              type="button"
-              data-mdb-toggle="collapse"
-              data-mdb-target="#sidebarMenu"
-              aria-controls="sidebarMenu"
-              aria-expanded="false"
-              aria-label="Toggle navigation"
-              onclick="function re(){ let r = $('#sidebarMenu'); if(r.hasClass('collapse'))r.removeClass('collapse');else r.addClass('collapse')}re()"
-            >
-              <i class="fas fa-bars"></i>
-            </button>
-
-            <!-- Brand -->
-            <a class="navbar-brand text-white" href="/">
-              <img src="/logo.gif" height="40" alt="" loading="lazy" />
-              Dashboard - Manage Server
-            </a>
-            <div>
-              <h1 class="server-name"></h1>
-            </div>
-          </div>
-        </nav>
-        <!-- Navbar -->
-      </header>
-      <!--Main Navigation-->
-
-      <!--Main layout-->
-      <main style="margin-top: 58px">
-        <div class="container pt-4">
-          <!--Section: Manage Server -->
-          <section>
-            <h1>Manage server</h1>
-            <div class="row">
-              <div class="col-xl-3 col-sm-6 col-12 mb-4">
-                <div class="card">
-                  <div class="card-body">
-                    <div class="d-flex justify-content-between px-md-1">
-                      <div>
-                        <h3 class="text-danger" id="songInQueue">0</h3>
-                        <p class="mb-0">Song in queue</p>
-                      </div>
-                      <div class="align-self-center">
-                        <i class="fas fa-music text-danger fa-3x"></i>
-                      </div>
-                    </div>
-                  </div>
-                </div>
-              </div>
-              <div class="col-xl-3 col-sm-6 col-12 mb-4">
-                <div class="card">
-                  <div class="card-body">
-                    <div class="d-flex justify-content-between px-md-1">
-                      <div>
-                        <h3 class="text-success" id="songLoop"></h3>
-                        <p class="mb-0">Song Loop</p>
-                      </div>
-                      <div class="align-self-center">
-                        <i class="fas fa-redo text-success fa-3x"></i>
-                      </div>
-                    </div>
-                  </div>
-                </div>
-              </div>
-              <div class="col-xl-3 col-sm-6 col-12 mb-4">
-                <div class="card">
-                  <div class="card-body">
-                    <div class="d-flex justify-content-between px-md-1">
-                      <div>
-                        <h3 class="text-warning" id="queueLoop"></h3>
-                        <p class="mb-0">Queue Loop</p>
-                      </div>
-                      <div class="align-self-center">
-                        <i class="fas fa-sync text-warning fa-3x"></i>
-                      </div>
-                    </div>
-                  </div>
-                </div>
-              </div>
-              <div class="col-xl-3 col-sm-6 col-12 mb-4">
-                <div class="card">
-                  <div class="card-body">
-                    <div class="d-flex justify-content-between px-md-1">
-                      <div>
-                        <h3 class="text-info" id="prefix">&gt;</h3>
-                        <p class="mb-0">Prefix</p>
-                      </div>
-                      <div class="align-self-center">
-                        <i class="fas fa-robot text-info fa-3x"></i>
-                      </div>
-                    </div>
-                  </div>
-                </div>
-              </div>
-            </div>
-
-            <div class="container text-center" id="song-info">
-              <h1>Song info</h1>
-              <p>Now playing: <span id="now-playing"></span></p>
-              <br />
-              <p>Duration</p>
-              <p id="duration"></p>
-            </div>
-          </section>
-          <!-- Footer -->
-          <div class="footer">
-            <div class="container">
-              <div class="row">
-                <div class="col-md-12">
-                  <div class="copyright-text">
-                    <p>
-                      © 2021
-                      <a href="//github.com/SudhanPlayz/Discord-MusicBot"
-                        >Discord Music Bot</a
-                      >. All rights reserved. Made by
-                      <a href="//github.com/SudhanPlayz">Sudhan</a> and its
-                      <a
-                        href="//github.com/SudhanPlayz/Discord-MusicBot/graphs/contributors"
-                        >contributers</a
-                      >
-                    </p>
-                  </div>
-                </div>
-              </div>
-            </div>
-          </div>
-          <!-- End Footer -->
-        </div>
-      </main>
-      <!--Main layout-->
-    </section>
-    <script
-      src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta3/dist/js/bootstrap.bundle.min.js"
-      integrity="sha384-JEW9xMcG8R+pH31jmWH6WWP0WintQrMb4s7ZOdauHnUtxwoG2vI5DkLtS3qm9Ekf"
-      crossorigin="anonymous"
-    ></script>
-    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
-    <script src="https://cdn.socket.io/4.0.1/socket.io.min.js"></script>
-  </body>
-  <style>
-    body {
-      background: var(--bs-gray-dark);
-      color: #fff;
-      overflow-x: hidden;
-    }
-
-    .card {
-      color: black;
-    }
-
-    @media (min-width: 991.98px) {
-      main {
-        padding-left: 240px;
-      }
-    }
-
-    /* Sidebar */
-    .sidebar {
-      position: fixed;
-      top: 0;
-      bottom: 0;
-      left: 0;
-      padding: 58px 0 0; /* Height of navbar */
-      box-shadow: 0 2px 5px 0 rgb(0 0 0 / 5%), 0 2px 10px 0 rgb(0 0 0 / 5%);
-      width: 240px;
-      z-index: 600;
-    }
-
-    @media (max-width: 991.98px) {
-      .sidebar {
-        width: 100%;
-      }
-    }
-    .sidebar .active {
-      border-radius: 5px;
-      box-shadow: 0 2px 5px 0 rgb(0 0 0 / 16%), 0 2px 10px 0 rgb(0 0 0 / 12%);
-    }
-
-    .sidebar-sticky {
-      position: relative;
-      top: 0;
-      height: calc(100vh - 48px);
-      padding-top: 0.5rem;
-      overflow-x: hidden;
-      overflow-y: auto;
-    }
-
-    #song-info span {
-      color: #5867dd;
-      text-decoration: none;
-      cursor: pointer;
-    }
-
-    #song-info span:hover {
-      color: #34bfa3;
-    }
-
-    .footer {
-      position: fixed;
-      bottom: 0;
-      background: #192027;
-      text-align: center;
-      padding: 32px 0;
-      width: 85%;
-      overflow: hidden;
-    }
-
-    .footer p {
-      margin: 0;
-      line-height: 26px;
-      font-size: 15px;
-      color: #999;
-    }
-
-    .footer p a {
-      color: #5867dd;
-      text-decoration: none;
-    }
-
-    .footer p a:hover {
-      color: #34bfa3;
-    }
-
-    ::-webkit-scrollbar {
-      width: 15px;
-    }
-
-    ::-webkit-scrollbar-track {
-      background: #192027;
-    }
-
-    ::-webkit-scrollbar-thumb {
-      background: #5867dd;
-      border-radius: 20px;
-    }
-
-    ::-webkit-scrollbar-thumb:hover {
-      background: #414ca1;
-    }
-  </style>
-  <script>
-    $(document).ready(() => {
-      $.get("/api/user", (data) => {
-        let Guild = data.user.guilds.find(
-          (x) => x.id == window.location.pathname.split("/")[2]
-        );
-        if (!Guild.inGuild) {
-          $.get("/api/info", (data) => {
-            window.location = `https://discord.com/oauth2/authorize?client_id=${
-              data.ClientID
-            }&permissions=${data.Permissions}&scope=bot%20${data.Scopes.join(
-              "%20"
-            )}&redirect_uri=${data.Website}${
-              data.CallbackURL
-            }&response_type=code`;
-          });
-        }
-        $(".server-name").text(Guild.name);
-      });
-
-      var socket = io();
-      socket.emit("server", window.location.pathname.split("/")[2]);
-
-      socket.on("server", (data) => {
-        $("#songLoop").text(data.songsLoop);
-        $("#queueLoop").text(data.queueLoop);
-        $("#prefix").text(data.prefix);
-        $("#now-playing").text(
-          data.nowPlaying ? data.nowPlaying.title : "Nothing playing"
-        );
-        if (data.position)
-          $("#duration").html(
-            `${data.position}<span> ${data.bar} </span>${data.maxDuration}`
-          );
-        else
-          $("#duration").html(
-            `<span> Nothing is playing right now, Add some songs in discord? </span>`
-          );
-      });
-    });
-  </script>
-</html>

+ 0 - 254
bot/views/servers.html

@@ -1,254 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-  <head>
-    <meta charset="UTF-8" />
-    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
-    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
-    <title>Dashboard - Servers</title>
-    <link rel="shortcut icon" href="/logo.gif" type="image/gif" />
-    <link
-      href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta3/dist/css/bootstrap.min.css"
-      rel="stylesheet"
-      integrity="sha384-eOJMYsd53ii+scO/bJGFsiCZc+5NDVN2yr8+0RDqr0Ql0h+rP48ckxlpbzKgwra6"
-      crossorigin="anonymous"
-    />
-    <link
-      rel="stylesheet"
-      href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.11.2/css/all.min.css"
-    />
-    <link
-      rel="stylesheet"
-      href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.11.2/css/fontawesome.min.css"
-    />
-  </head>
-  <body>
-    <section class="main">
-      <!--Main Navigation-->
-      <header>
-        <!-- Sidebar -->
-        <nav id="sidebarMenu" class="collapse d-lg-block sidebar collapse">
-          <div class="position-sticky">
-            <div class="list-group list-group-flush mx-3 mt-4">
-              <a
-                href="/dashboard"
-                class="list-group-item list-group-item-action py-2 ripple"
-                aria-current="true"
-              >
-                <i class="fas fa-tachometer-alt fa-fw me-3"></i
-                ><span>Main dashboard</span>
-              </a>
-              <a
-                href="/servers"
-                class="list-group-item list-group-item-action py-2 ripple active"
-              >
-                <i class="fas fa-server fa-fw me-3"></i
-                ><span>Manage Servers</span>
-              </a>
-              <a
-                href="/logout"
-                class="list-group-item list-group-item-action py-2 ripple"
-              >
-                <i class="fas fa-sign-out-alt fa-fw me-3"></i
-                ><span>Logout</span>
-              </a>
-            </div>
-          </div>
-        </nav>
-        <!-- Sidebar -->
-
-        <!-- Navbar -->
-        <nav
-          id="main-navbar"
-          class="navbar navbar-expand-lg navbar-light fixed-top"
-        >
-          <!-- Container wrapper -->
-          <div class="container-fluid">
-            <!-- Toggle button -->
-            <button
-              class="navbar-toggler"
-              type="button"
-              data-mdb-toggle="collapse"
-              data-mdb-target="#sidebarMenu"
-              aria-controls="sidebarMenu"
-              aria-expanded="false"
-              aria-label="Toggle navigation"
-              onclick="function re(){ let r = $('#sidebarMenu'); if(r.hasClass('collapse'))r.removeClass('collapse');else r.addClass('collapse')}re()"
-            >
-              <i class="fas fa-bars"></i>
-            </button>
-
-            <!-- Brand -->
-            <a class="navbar-brand text-white" href="/">
-              <img src="/logo.gif" height="40" alt="" loading="lazy" />
-              Dashboard - Servers
-            </a>
-            <div>
-              <h1 class="server-name"></h1>
-            </div>
-          </div>
-        </nav>
-        <!-- Navbar -->
-      </header>
-      <!--Main Navigation-->
-
-      <!--Main layout-->
-      <main style="margin-top: 58px">
-        <div class="container pt-4">
-          <!--Section: Main-->
-          <section>
-            <h1>Select a server to manage</h1>
-            <div id="servers" class="flex"></div>
-          </section>
-          <!-- Footer -->
-          <div class="footer">
-            <div class="container">
-              <div class="row">
-                <div class="col-md-12">
-                  <div class="copyright-text">
-                    <p>
-                      © 2021
-                      <a href="//github.com/SudhanPlayz/Discord-MusicBot"
-                        >Discord Music Bot</a
-                      >. All rights reserved. Made by
-                      <a href="//github.com/SudhanPlayz">Sudhan</a> and its
-                      <a
-                        href="//github.com/SudhanPlayz/Discord-MusicBot/graphs/contributors"
-                        >contributers</a
-                      >
-                    </p>
-                  </div>
-                </div>
-              </div>
-            </div>
-          </div>
-          <!-- End Footer -->
-        </div>
-      </main>
-      <!--Main layout-->
-    </section>
-    <script
-      src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta3/dist/js/bootstrap.bundle.min.js"
-      integrity="sha384-JEW9xMcG8R+pH31jmWH6WWP0WintQrMb4s7ZOdauHnUtxwoG2vI5DkLtS3qm9Ekf"
-      crossorigin="anonymous"
-    ></script>
-    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
-    <script src="https://cdn.socket.io/4.0.1/socket.io.min.js"></script>
-  </body>
-  <style>
-    body {
-      background: var(--bs-gray-dark);
-      color: #fff;
-      overflow-x: hidden;
-    }
-
-    @media (min-width: 991.98px) {
-      main {
-        padding-left: 240px;
-      }
-    }
-
-    /* Sidebar */
-    .sidebar {
-      position: fixed;
-      top: 0;
-      bottom: 0;
-      left: 0;
-      padding: 58px 0 0; /* Height of navbar */
-      box-shadow: 0 2px 5px 0 rgb(0 0 0 / 5%), 0 2px 10px 0 rgb(0 0 0 / 5%);
-      width: 240px;
-      z-index: 600;
-    }
-
-    @media (max-width: 991.98px) {
-      .sidebar {
-        width: 100%;
-      }
-    }
-    .sidebar .active {
-      border-radius: 5px;
-      box-shadow: 0 2px 5px 0 rgb(0 0 0 / 16%), 0 2px 10px 0 rgb(0 0 0 / 12%);
-    }
-
-    .sidebar-sticky {
-      position: relative;
-      top: 0;
-      height: calc(100vh - 48px);
-      padding-top: 0.5rem;
-      overflow-x: hidden;
-      overflow-y: auto;
-    }
-
-    #servers img {
-      border-radius: 50%;
-      margin: 10px;
-      cursor: pointer;
-    }
-
-    .hide {
-      display: none;
-    }
-
-    .footer {
-      position: absolute;
-      bottom: 0;
-      background: #192027;
-      text-align: center;
-      padding: 32px 0;
-      width: 85%;
-    }
-
-    .footer p {
-      margin: 0;
-      line-height: 26px;
-      font-size: 15px;
-      color: #999;
-    }
-
-    .footer p a {
-      color: #5867dd;
-      text-decoration: none;
-    }
-
-    .footer p a:hover {
-      color: #34bfa3;
-    }
-
-    ::-webkit-scrollbar {
-      width: 15px;
-    }
-
-    ::-webkit-scrollbar-track {
-      background: #192027;
-    }
-
-    ::-webkit-scrollbar-thumb {
-      background: #5867dd;
-      border-radius: 20px;
-    }
-
-    ::-webkit-scrollbar-thumb:hover {
-      background: #414ca1;
-    }
-  </style>
-  <script>
-    $(document).ready(() => {
-      $.get("/api/user", (data) => {
-        data.user.guilds.forEach((Guild) => {
-          if (!Guild.hasPerms) return;
-          $("#servers").append(`
-<img class="server-${Guild.id}" onclick="window.location = '/servers/${
-            Guild.id
-          }'" width="60" height="60" src="${
-            Guild.icon
-              ? `https://cdn.discordapp.com/icons/${Guild.id}/${Guild.icon}.png`
-              : "https://www.webcolorsonline.com/images/error.png"
-          }" alt="${Guild.name}">
-`); //yes ofcource im an IDIOT
-          $(`.server-${Guild.id}`).hover(() => {
-            $(".server-name").text(Guild.name);
-          });
-        });
-      });
-    });
-  </script>
-</html>