├── .github └── FUNDING.yml ├── .gitignore ├── .replit ├── LICENSE ├── README.md ├── commands ├── Information │ ├── help.js │ ├── invite.js │ ├── language.js │ └── ping.js └── Music │ ├── clearqueue.js │ ├── join.js │ ├── leave.js │ ├── loop.js │ ├── lyrics.js │ ├── nowplaying.js │ ├── pause.js │ ├── play.js │ ├── queue.js │ ├── remove.js │ ├── resume.js │ ├── shuffle.js │ ├── skip.js │ ├── skipto.js │ ├── stop.js │ └── volume.js ├── config.json ├── events ├── Client │ ├── messageCreate.js │ ├── ready.js │ └── voiceStateUpdate.js └── Lavalink │ ├── nodeConnect.js │ ├── nodeCreate.js │ ├── nodeDisconnect.js │ ├── nodeError.js │ ├── nodeReconnect.js │ ├── playerMove.js │ ├── queueEnd.js │ ├── socketClosed.js │ ├── trackEnd.js │ ├── trackError.js │ ├── trackStart.js │ └── trackStuck.js ├── fivedb.json ├── index.js ├── lang.json ├── package.json ├── replit.nix └── utils ├── convert.js ├── logger.js └── progressbar.js /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: [Bes-js] 4 | custom: ["https://www.buymeacoffee.com/beykant"] 5 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Ignore all files in the .vscode folder 2 | /.vscode 3 | 4 | # Ignore all files in the node_modules folder 5 | /node_modules -------------------------------------------------------------------------------- /.replit: -------------------------------------------------------------------------------- 1 | run = "npm run start" 2 | hidden = [".dist", ".config"] 3 | 4 | [packager] 5 | language = "nodejs" 6 | 7 | [packager.features] 8 | enabledForHosting = false 9 | packageSearch = true 10 | guessImports = true 11 | 12 | [env] 13 | XDG_CONFIG_HOME = "/home/runner/.config" 14 | 15 | [nix] 16 | channel = "stable-22_11" 17 | 18 | [gitHubImport] 19 | requiredFiles = [".replit", "replit.nix", ".config"] 20 | 21 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Bes-js, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 2023 Bes-js 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | discord-v14-bots Copyright (C) 2023 Bes-js 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |
2 | 3 | [![Version][version-shield]](version-url) 4 | [![Contributors][contributors-shield]][contributors-url] 5 | [![Forks][forks-shield]][forks-url] 6 | [![Stargazers][stars-shield]][stars-url] 7 | [![Issues][issues-shield]][issues-url] 8 | [![MIT License][license-shield]][license-url] 9 | [![Run on Repl.it](https://repl.it/badge/github/Bes-js/advanced-music-bot)](https://repl.it/github/Bes-js/advanced-music-bot) 10 | [![Remix on Glitch](https://cdn.glitch.com/2703baf2-b643-4da7-ab91-7ee2a2d00b5b%2Fremix-button.svg)](https://glitch.com/edit/#!/import/github/Bes-js/advanced-music-bot) 11 | 12 |
13 |

14 | 15 | Pbot-plus 16 | 17 |

Advanced Music Bot

18 |

Advanced Music Bot is a V14 Music Bot that uses Discord.js Package and Supports All Languages ​​Powered by Erela.js. 19 |
20 |
21 | Report Bug & Request Feature 22 |

23 |

24 | 25 | ## 🔥 Unique Features 26 | 27 | - Developed using JavaScript and Discord.js v14 28 | - Advanced Music System 29 | - Customizable Languages 30 | - Powerful Search Engine 31 | - Highly Configurable 32 | - User-friendly and Easy to Use 33 | - Playlist Supports 34 | 35 | ## 🎶 Support Sources 36 | 37 | - ![YouTube](https://img.shields.io/badge/YouTube-FF0000?style=plastic&logo=youtube&logoColor=white) 38 | - ![Spotify](https://img.shields.io/badge/Spotify-1ED760?style=plastic&logo=spotify&logoColor=white) 39 | - ![SoundCloud](https://img.shields.io/badge/SoundCloud-FF3300?style=plastic&logo=soundcloud&logoColor=white) 40 | - ![Twitch](https://img.shields.io/badge/Twitch-9146FF?style=plastic&logo=twitch&logoColor=white) 41 | - ![Bandcamp](https://img.shields.io/badge/Bandcamp-629AA9?style=plastic&logo=bandcamp&logoColor=white) 42 | - ![Vimeo](https://img.shields.io/badge/Vimeo-1AB7EA?style=plastic&logo=vimeo&logoColor=white) 43 | - ![http](https://img.shields.io/badge/http-FFA500?style=plastic&logo=http&logoColor=white) 44 | 45 | 🔌 **Plugin Sources**: `(Require: LavaLink v3.6.x)` 46 | 47 | ## 📚 Commands 48 | 49 |
Click to View Commands 50 | 51 | | Name | Description | Options | 52 | |-------------|------------------------------------------|-------------------------------------------| 53 | | `help` | Shows the help menu | `command`: The command you want to get info | 54 | | `language` | Setup guild language | `langCode`: Global Code of Your Language | 55 | | `lyrics` | Get lyrics for the currently playing song | | 56 | | `invite` | Sends the bot's invite link | | 57 | | `ping` | Shows the bot's ping | | 58 | | `clearqueue` | Clears the queue | | 59 | | `join` | Joins the voice channel | | 60 | | `leave` | Leaves the voice channel | | 61 | | `nowplaying` | Shows the currently playing song | | 62 | | `play` | Plays a song from YouTube or Spotify | `song`: The song you want to play | 63 | | `pause` | Pauses the current song | | 64 | | `queue` | Shows the current queue | | 65 | | `remove` | Removes a song from the queue | `song`: The song number | 66 | | `resume` | Resumes the current song | | 67 | | `seek` | Seeks to a certain time in the song | | 68 | | `shuffle` | Shuffles the queue | | 69 | | `skip` | Skips the current song | | 70 | | `skipto` | Skips to a specific song in the queue | | 71 | | `stop` | Stops the music and clears the queue | | 72 | | `volume` | Sets the volume of the player | `number`: The volume you want to set | 73 | 74 |
75 | 76 | ## 🔧 Requirements 77 | 78 | Before starting with the installation, you need to have the following: 79 | 80 | - ![Node.js](https://img.shields.io/badge/Node.js-43853D?style=for-the-badge&logo=node.js&logoColor=white) [v18.16.0 or higher](https://nodejs.org/en/download/) 81 | - ![Lavalink](https://img.shields.io/badge/Lavalink-7289DA?style=for-the-badge&logo=discord&logoColor=white) [v3.7.5 or higher](https://github.com/freyacodes/Lavalink) 82 | 83 | ## 🚀 Installation from source 84 | 85 | 1. Clone the advanced-music-bot repository: 86 | 87 | ```bash 88 | git clone https://github.com/Bes-js/advanced-music-bot.git 89 | ``` 90 | 91 | 2. change the directory to Lavamusic 92 | 93 | ```bash 94 | cd advanced-music-bot 95 | ``` 96 | 97 | 3. Install the required packages: 98 | 99 | ```bash 100 | npm install 101 | ``` 102 | 103 | 4. Set up your config.json file: 104 | 105 | ```json 106 | { 107 | "token":"Your Discord Bot Token", 108 | "prefix": ".", 109 | 110 | "clientID": "Spotify clientID", 111 | "clientSecret": "Spotify clientSecret", 112 | "nodes": [ 113 | { 114 | "host" : "narco.buses.rocks", 115 | "port" : 2269, 116 | "password" : "glasshost1984", 117 | "secure" : false 118 | } 119 | ] 120 | } 121 | ``` 122 | 123 | 5. Run the bot: 124 | 125 | ```bash 126 | npm run start or npm start 127 | ``` 128 | 129 | 6. Invite the bot to your server: 130 | 131 | Generate an invite link for your bot and invite it to your server using the Discord Developer Portal or using permissions calculator: 132 | 133 | Do note that the bot will restart itself to update to the latest! 134 | 135 | ## 🔗 Useful Links 136 | 137 | - ![Node.js](https://img.shields.io/badge/Node.js-43853D?style=for-the-badge&logo=node.js&logoColor=white) [Node.js](https://nodejs.org/en/download/) 138 | - ![Discord.js](https://img.shields.io/badge/Discord.js-7289DA?style=for-the-badge&logo=discord&logoColor=white) [Discord.js](https://discord.js.org/#/) 139 | - ![Lavalink](https://img.shields.io/badge/Lavalink-7289DA?style=for-the-badge&logo=discord&logoColor=white) [Lavalink](https://github.com/freyacodes/Lavalink) 140 | - [All Language Codes](https://www.loc.gov/standards/iso639-2/php/code_list.php) 141 | 142 | ## 🔐 License 143 | 144 | Distributed under the GPL-3.0 license License. See ![LICENSE](https://img.shields.io/github/license/Bes-js/advanced-music-bot?style=social) for more information. 145 | 146 | ## 🔵 My Discord Profile 147 | 148 | 149 | ## ☕ Donate & ❓ Support 150 | Do you like this project? Support it by donating 151 | 152 | [![Discord Banner](https://api.weblutions.com/discord/invite/luppux/)](https://discord.gg/luppux) 153 |

154 | Buy Me A Coffee 155 |

156 |

157 |

158 | 💗 Readme Section Extracted from brblacky. 159 | 160 | [version-shield]: https://img.shields.io/github/package-json/v/Bes-js/advanced-music-bot?style=for-the-badge 161 | [contributors-shield]: https://img.shields.io/github/contributors/Bes-js/advanced-music-bot.svg?style=for-the-badge 162 | [contributors-url]: https://github.com/Bes-js/advanced-music-bot/graphs/contributors 163 | [forks-shield]: https://img.shields.io/github/forks/Bes-js/advanced-music-bot.svg?style=for-the-badge 164 | [forks-url]: https://github.com/Bes-js/advanced-music-bot/network/members 165 | [stars-shield]: https://img.shields.io/github/stars/Bes-js/advanced-music-bot.svg?style=for-the-badge 166 | [stars-url]: https://github.com/Bes-js/advanced-music-bot/stargazers 167 | [issues-shield]: https://img.shields.io/github/issues/Bes-js/advanced-music-bot.svg?style=for-the-badge 168 | [issues-url]: https://github.com/Bes-js/advanced-music-bot/issues 169 | [license-shield]: https://img.shields.io/github/license/Bes-js/advanced-music-bot.svg?style=for-the-badge 170 | [license-url]: https://github.com/Bes-js/advanced-music-bot/blob/master/LICENSE 171 | -------------------------------------------------------------------------------- /commands/Information/help.js: -------------------------------------------------------------------------------- 1 | const {codeBlock, StringSelectMenuBuilder, ActionRowBuilder, EmbedBuilder} = require("discord.js") 2 | const client = global.client; 3 | module.exports = { 4 | name: "help", 5 | category: "Information", 6 | aliases: ["h","yardım"], 7 | description: "Return all commands, or one specific command", 8 | args: false, 9 | execute: async (message, args, client, prefix) => { 10 | 11 | var l1 = await client.translate(message.guild.id,`Müzik Komutları`) 12 | var l2 = await client.translate(message.guild.id,`Diğer Komutlar`) 13 | var l3 = await client.translate(message.guild.id,"Yardım Menüsü") 14 | var l4 = await client.translate(message.guild.id,"Bot Tüm Dilleri Desteklemektedir!") 15 | var l5 = await client.translate(message.guild.id,`Altyapı Hakkında Bilgi`) 16 | const menu = new ActionRowBuilder() 17 | .addComponents([ 18 | new StringSelectMenuBuilder() 19 | .setCustomId('help') 20 | .setPlaceholder(`${l3}`) 21 | .setOptions([ 22 | {value:"music",label:`${l1}`,emoji:"🎵"}, 23 | {value:"other",label:`${l2}`,emoji:"✨"}, 24 | {value:"github",label:`${l5}`,emoji:"👌"} 25 | ]) 26 | ]) 27 | 28 | return message.channel.send({embeds:[new EmbedBuilder().setColor("Random").setDescription(`🇹🇷 🇫🇷 🇺🇸 🇪🇸 ${l4}`)],components:[menu]}); 29 | } 30 | } 31 | 32 | client.on("interactionCreate",async(five) => { 33 | if(!five.isStringSelectMenu())return; 34 | var value = five.values[0]; 35 | 36 | if(value == "music"){ 37 | five.reply({content:`${codeBlock('js',` 38 | Example; ${client.prefix}play 39 | play ,skip ,stop ,queue ,nowplaying ,loop ,join ,leave ,clear ,pause ,resume ,remove ,shuffle ,lyrics ,skipto ,volume`)}`,ephemeral:true}) 40 | } 41 | 42 | if(value == "other"){ 43 | five.reply({content:`${codeBlock('js',` 44 | Example; ${client.prefix}invite 45 | ,invite ,ping ,help`)}`,ephemeral:true}) 46 | } 47 | 48 | if(value == "github"){ 49 | five.reply({content:`> https://github.com/Bes-js/advanced-music-bot`,ephemeral:true}) 50 | } 51 | }) -------------------------------------------------------------------------------- /commands/Information/invite.js: -------------------------------------------------------------------------------- 1 | const { EmbedBuilder, ActionRowBuilder, ButtonBuilder, ButtonStyle } = require("discord.js"); 2 | module.exports = { 3 | name: "invite", 4 | category: "Information", 5 | aliases: [ "addme","davet"], 6 | description: "invite Five", 7 | args: false, 8 | execute: async (message, args, client, prefix) => { 9 | var l1 = await client.translate(message.guild.id,`Davet Butonuna Basarak Sunucunuza Davet Edebilirsiniz!`) 10 | var l2 = await client.translate(message.guild.id,`Davet`) 11 | return message.channel.send({embeds: [new EmbedBuilder().setColor("Random").setDescription(`> **${l1}**`)], components: [new ActionRowBuilder().addComponents(new ButtonBuilder().setLabel(`${l2}`).setStyle(ButtonStyle.Link).setURL(`https://discord.com/api/oauth2/authorize?client_id=${client.user.id}&permissions=8&scope=applications.commands%20bot`))]}) 12 | } 13 | } -------------------------------------------------------------------------------- /commands/Information/language.js: -------------------------------------------------------------------------------- 1 | const client = global.client; 2 | const db = client.db; 3 | const langs = require("../../lang.json") 4 | module.exports = { 5 | name: "language", 6 | category: "Information", 7 | aliases: ["lng","lang"], 8 | description: "Setup guild language", 9 | args: false, 10 | execute: async (message, args, client, prefix) => { 11 | var selection = args[0]; 12 | var l1 = await client.translate(message.guild.id,`Bir Dil Kodu Girmen Gerekmekte! Örnek; \`${prefix}language en\``) 13 | if(!selection) return message.channel.send({content:`**${l1}**`}) 14 | var l2 = await client.translate(message.guild.id,`Geçerli Bir Dil Kodu Girmen Gerekmekte! Örnek; \`${prefix}language en\``) 15 | if(!langs.all.some(lang => selection == lang.code))return message.channel.send({content:`**${l2}**`}) 16 | var finded = langs.all.find(lang => lang.code == selection); 17 | db.set(`language-${message.guild.id}`, `${selection}`) 18 | return message.channel.send({content:`> **👌 Language Code; \`${finded.code}\`**\n> **Native Name; \`${finded.nativeName} (${finded.name})\`**`}) 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /commands/Information/ping.js: -------------------------------------------------------------------------------- 1 | const { EmbedBuilder } = require("discord.js"); 2 | module.exports = { 3 | name: "ping", 4 | category: "Information", 5 | description: "Check Ping Bot", 6 | args: false, 7 | execute: async (message, args, client, prefix) => { 8 | var l1 = await client.translate(message.guild.id,`Milisaniye`) 9 | return message.channel.send({embeds: [new EmbedBuilder().setAuthor({name:`Ping`,iconURL:client.user.displayAvatarURL({ dynamic: true })}).setColor("Random").addFields([{name:`Ping`,value:`**${client.ws.ping}** *${l1}*`,inline:false}]).setTimestamp()]}); 10 | } 11 | }; 12 | -------------------------------------------------------------------------------- /commands/Music/clearqueue.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | name: "clearqueue", 3 | aliases: ["cq","clear","temizle"], 4 | category: "Music", 5 | description: "Clear Queue", 6 | args: false, 7 | usage: "", 8 | player: true, 9 | inVoiceChannel: true, 10 | sameVoiceChannel: true, 11 | execute: async (message, args, client, prefix) => { 12 | const player = message.client.manager.get(message.guild.id); 13 | var l1 = await client.translate(message.guild.id,"Çalan Bir Şarkı Bulunmamakta.") 14 | if (!player.queue.current) return message.channel.send({content:`**${l1}**`}); 15 | var l2 = await client.translate(message.guild.id,"🗑️ Tüm Şarkılar Temizlendi.") 16 | player.queue.clear(); 17 | return message.channel.send(`**${l2}**`); 18 | } 19 | }; -------------------------------------------------------------------------------- /commands/Music/join.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | name: "join", 3 | aliases: ["j","katıl"], 4 | category: "Music", 5 | description: "Join voice channel", 6 | args: false, 7 | player: false, 8 | inVoiceChannel: true, 9 | sameVoiceChannel: false, 10 | execute: async (message, args, client, prefix) => { 11 | const { channel } = message.member.voice; 12 | if(!message.guild.members.cache.get(client.user.id).voice.channel) { 13 | const player = message.client.manager.create({guild: message.guild.id,voiceChannel: channel.id, 14 | textChannel: message.channel.id,volume: 100,selfDeafen: true,}); 15 | player.connect(); 16 | var l1 = await client.translate(message.guild.id,`<#${channel.id}> Kanalına Katıldım <#${message.channel.id}> Kanalına Bilgi Atacağım`) 17 | return message.channel.send({content:`**${l1}**`}); 18 | } else if (message.guild.members.cache.get(client.user.id).voice.channel !== channel) { 19 | var l2 = await client.translate(message.guild.id,`Benimle Aynı Kanalda Olmalısın ${message.client.user}!`) 20 | return message.channel.send({content:`**${l2}**`}); 21 | } 22 | } 23 | }; -------------------------------------------------------------------------------- /commands/Music/leave.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | name: "leave", 3 | aliases: ["dc","ayrıl"], 4 | category: "Music", 5 | description: "Leave voice channel", 6 | args: false, 7 | player: false, 8 | inVoiceChannel: true, 9 | sameVoiceChannel: true, 10 | execute: async (message, args, client, prefix) => { 11 | const player = message.client.manager.get(message.guild.id); 12 | var l1 = await client.translate(message.guild.id,`Zaten Kanalda Değilim.`) 13 | if (!player)return message.channel.send({content:`**${l1}**`}); 14 | var l2 = await client.translate(message.guild.id,`👌 Sesli Kanaldan Ayrıldım.`) 15 | player.destroy(); 16 | return message.channel.send({content:`**${l2}**`}); 17 | } 18 | }; -------------------------------------------------------------------------------- /commands/Music/loop.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | name: "loop", 3 | aliases: ['l',"döngü"], 4 | category: "Music", 5 | description: "Toggle music loop", 6 | args: false, 7 | player: true, 8 | inVoiceChannel: true, 9 | sameVoiceChannel: true, 10 | execute: async (message, args, client, prefix) => { 11 | const player = message.client.manager.get(message.guild.id); 12 | var l1 = await client.translate(message.guild.id,`Çalan Bir Şarkı Bulunmamakta.`) 13 | if (!player.queue.current) return message.channel.send({content:`**${l1}**`}) 14 | 15 | if (args.length && /queue/i.test(args[0])) { 16 | player.setQueueRepeat(!player.queueRepeat); 17 | const queueRepeat = player.queueRepeat ? "🟢" : "🔴"; 18 | var l2 = await client.translate(message.guild.id,`Döngü Şuan`) 19 | return message.channel.send({content:`**${l2} [${queueRepeat}]**`}); 20 | } 21 | 22 | player.setTrackRepeat(!player.trackRepeat); 23 | const trackRepeat = player.trackRepeat ? "🟢" : "🔴"; 24 | var l3 = await client.translate(message.guild.id,`Döngü Şuan`) 25 | return message.channel.send({content:`**${l3} [${trackRepeat}]**`}); 26 | } 27 | }; -------------------------------------------------------------------------------- /commands/Music/lyrics.js: -------------------------------------------------------------------------------- 1 | const { EmbedBuilder } = require("discord.js") 2 | const lyricsFinder = require("lyrics-finder"); 3 | const _ = require("lodash"); 4 | module.exports = { 5 | name: "lyrics", 6 | aliases: ["ly","Lyrics","söz","sözler"], 7 | category: "Music", 8 | description: "Get lyrics for the currently playing song", 9 | args: false, 10 | execute: async (message, args, client) => { 11 | let player = message.client.manager.get(message.guild.id); 12 | var l1 = await client.translate(message.guild.id,`Çalan Bir Şarkı Bulunmamakta Veya Kelime Girilmedi.`) 13 | if (!args[0] && !player)return message.channel.send({content:`**${l1}**`}); 14 | let SongTitle = args.join(' ') ? args.join(' ') : player.queue.current.title; 15 | SongTitle = SongTitle.replace(/lyrics|lyric|lyrical|official music video|\(official music video\)|audio|feat|feat.|prod by|official|video|official video|official video hd|official hd video|offical video music|\(offical video music\)|extended|hd|(\[+\])/gi,""); 16 | let lyrics = await lyricsFinder(SongTitle); 17 | var l2 = await client.translate(message.guild.id,`İçin Şarkı Sözünü Bulamadım.`) 18 | if (!lyrics)return message.channel.send({content:`**\`${SongTitle}\` - ${l2}**`}); 19 | lyrics = lyrics.split("\n"); 20 | let SplitedLyrics = _.chunk(lyrics, 40); 21 | SplitedLyrics.map((ly) => { 22 | let em = new EmbedBuilder() 23 | .setAuthor({name:`${SongTitle}`}) 24 | .setColor("Random") 25 | .setTimestamp() 26 | .setDescription(ly.join("\n")); 27 | return message.channel.send({embeds:[em]}); 28 | }); 29 | }} -------------------------------------------------------------------------------- /commands/Music/nowplaying.js: -------------------------------------------------------------------------------- 1 | const { EmbedBuilder } = require("discord.js"); 2 | const { convertTime } = require('../../utils/convert.js'); 3 | const { progressbar } = require('../../utils/progressbar.js') 4 | module.exports = { 5 | name: "nowplaying", 6 | aliases: ["np","çalan","şuan"], 7 | category: "Music", 8 | description: "Show now playing song", 9 | args: false, 10 | player: true, 11 | inVoiceChannel: false, 12 | sameVoiceChannel: false, 13 | execute: async (message, args, client, prefix) => { 14 | const player = message.client.manager.get(message.guild.id); 15 | var l1 = await client.translate(message.guild.id,`Çalan Bir Şarkı Bulunmamakta.`) 16 | if (!player.queue.current) return message.channel.send({content:`**${l1}**`}) 17 | const song = player.queue.current 18 | var l2 = await client.translate(message.guild.id,`Şuan Çalan`) 19 | var l3 = await client.translate(message.guild.id,`Kanal`) 20 | var l4 = await client.translate(message.guild.id,`Ekliyen Kişi`) 21 | var l5 = await client.translate(message.guild.id,`Süre`) 22 | let embed = new EmbedBuilder() 23 | .setAuthor({name:`🎶 ${l2}`,iconURL:message.author.avatarURL({dynamic: true})}) 24 | .setTitle(`**${song.title}**`).setURL(`${song.uri}`) 25 | .addFields([ 26 | {name:`${l3}`,value:`${song.author}`,inline:true}, 27 | {name:`${l4}`,value:`<@${song.requester.id}>`,inline:true}, 28 | {name:`${l5}`,value:`**\`[${convertTime(song.duration)}]\`**`,inline:true}, 29 | ]).setThumbnail(song.displayThumbnail("mqdefault")).setColor("Random") 30 | .addFields([ 31 | {name:"\u200b",value:progressbar(song.duration, player.position, 15, '▬', '🟢'),inline:false}, 32 | {name:"\u200b",value:`\`${convertTime(player.position)} / ${convertTime(song.duration)}\``,inline:false} 33 | ]) 34 | return message.channel.send({embeds: [embed]}) 35 | } 36 | }; -------------------------------------------------------------------------------- /commands/Music/pause.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | name: "pause", 3 | aliases: ["durdur"], 4 | category: "Music", 5 | description: "Pause the currently playing music", 6 | args: false, 7 | player: true, 8 | inVoiceChannel: true, 9 | sameVoiceChannel: true, 10 | execute: async (message, args, client, prefix) => { 11 | const player = message.client.manager.get(message.guild.id); 12 | var l1 = await client.translate(message.guild.id,`Çalan Bir Şarkı Bulunmamakta.`) 13 | if (!player.queue.current) return message.channel.send({content:`**${l1}**`}); 14 | var l2 = await client.translate(message.guild.id,`Şarkı Zaten Durdurulmuş.`) 15 | if (player.paused) return message.channel.send({content:`**${l2}**`}); 16 | player.pause(true); 17 | var l3 = await client.translate(message.guild.id,`Durduruldu`) 18 | return message.channel.send({content:`**⏹️ ${l3}** \`${player.queue.current.title}\``}); 19 | } 20 | }; -------------------------------------------------------------------------------- /commands/Music/play.js: -------------------------------------------------------------------------------- 1 | const { EmbedBuilder } = require("discord.js"); 2 | const { convertTime } = require('../../utils/convert.js'); 3 | 4 | module.exports = { 5 | name: "play", 6 | category: "Music", 7 | aliases: ["p", "çal", "oynat"], 8 | description: "Plays audio from YouTube,Soundcloud Or Spotify", 9 | args: true, 10 | usage: "", 11 | owner: false, 12 | player: false, 13 | inVoiceChannel: true, 14 | sameVoiceChannel: false, 15 | execute: async (message, args, client, prefix) => { 16 | 17 | const { channel } = message.member.voice; 18 | var player = message.client.manager.get(message.guild.id); 19 | 20 | if (player && message.member?.voice?.channel !== message.guild.members.cache.get(client.user.id).voice?.channel) { 21 | var l1 = await client.translate(message.guild.id,`Müzik Dinliyebilmek İçin Benimle Aynı Kanalda Olmalısın!`) 22 | return message.channel.send({ content: `**${l1}**` }); 23 | } else if (!player) { 24 | var player = message.client.manager.create({ 25 | guild: message.guild.id, voiceChannel: channel.id, textChannel: message.channel.id, 26 | volume: 100, selfDeafen: true, 27 | }); 28 | } 29 | 30 | if (player.state !== "CONNECTED") player.connect(); 31 | player.set("autoplay", false); 32 | 33 | const search = args.join(' '); 34 | let res; 35 | var l2 = await client.translate(message.guild.id,`Aranıyor`) 36 | if (message.content.includes("youtu")) { 37 | message.channel.send({ content: `> \`🔴 Youtube \` **${l2}** :mag_right: **\`${args.join(" ")}\`**` }) 38 | } else if (message.content.includes("spotify")) { 39 | message.channel.send({ content: `> \`🟢 Spotify \` **${l2}** :mag_right: **\`${args.join(" ")}\`**` }) 40 | } else if (message.content.includes("soundcloud")) { 41 | message.channel.send({ content: `> \`🟠 SoundCloud \` **${l2}** :mag_right: **\`${args.join(" ")}\`**` }) 42 | } else { 43 | message.channel.send({ content: `> \`🔴 Youtube \` **${l2}** :mag_right: **\`${args.join(" ")}\`**` }) 44 | } 45 | 46 | try { 47 | res = await player.search(search, message.author); 48 | if (res.loadType === 'LOAD_FAILED') { 49 | if (!player.queue.current) player.destroy(); 50 | throw res.exception; 51 | } 52 | } catch (err) { 53 | var l3 = await client.translate(message.guild.id,`Parçayı Arama Sırasında Bir Hata İle Karşılaştım:`) 54 | return message.channel.send({ content: `> **⚠️ ${l3} ${err.message}**` }); 55 | } 56 | 57 | switch (res.loadType) { 58 | case 'NO_MATCHES': 59 | if (!player.queue.current) player.destroy(); 60 | var l4 = await client.translate(message.guild.id,`Aramadan Bir Sonuç Bulunamadı..`) 61 | return message.channel.send({ content: `> **❌ ${l4}**` }); 62 | case 'TRACK_LOADED': 63 | var track = res.tracks[0]; 64 | player.set("autoplay", false); 65 | player.queue.add(track); 66 | if (!player.playing && !player.paused && !player.queue.size) { 67 | return player.play(); 68 | } else { 69 | var l5 = await client.translate(message.guild.id,`Kanal`) 70 | var l6 = await client.translate(message.guild.id,`Ekliyen Kişi`) 71 | var l7 = await client.translate(message.guild.id,`Süre`) 72 | var l8 = await client.translate(message.guild.id,`Kuyruğa Şarkı Eklendi`) 73 | var embed = new EmbedBuilder().setColor("Random").setTimestamp().addFields([ 74 | { name: `${l5}`, value: `${track.author}`, inline: true }, 75 | { name: `${l6}`, value: `<@${track.requester.id}>`, inline: true }, 76 | { name: `${l7}`, value: `**\`[${convertTime(track.duration)}]\`**`, inline: true } 77 | ]).setAuthor({ name: `🎵 ${l8}`, iconURL: message.author.avatarURL({ dynamic: true }) }).setThumbnail(`https://img.youtube.com/vi/${track.identifier}/mqdefault.jpg`).setTitle(`**${track.title}**`).setURL(`https://img.youtube.com/vi/${track.identifier}/mqdefault.jpg`) 78 | return message.channel.send({ embeds: [embed] }); 79 | } 80 | case 'PLAYLIST_LOADED': 81 | var l9 = await client.translate(message.guild.id,`Kuyruğa Liste Eklendi`) 82 | var l10 = await client.translate(message.guild.id,`Adet Şarkı`) 83 | player.set("autoplay", false); 84 | player.queue.add(res.tracks); 85 | if (!player.playing && !player.paused && player.queue.totalSize === res.tracks.length) player.play(); 86 | var embed = new EmbedBuilder().setColor(client.embedColor).setTimestamp().setThumbnail(`https://cdn.discordapp.com/emojis/900883866527596614.png?size=128&quality=lossless`).setAuthor({ name: `🎵 ${l9}`, iconURL: message.author.avatarURL({ dynamic: true }) }).setTitle(`**${res.tracks.length} ${l10}** \`${res.playlist.name}\` **~** \`[${convertTime(res.playlist.duration)}]\``).setURL(`https://cdn.discordapp.com/emojis/900883866527596614.png?size=128&quality=lossless`) 87 | return message.channel.send({ embeds: [embed] }); 88 | case 'SEARCH_RESULT': 89 | var track = res.tracks[0]; 90 | player.set("autoplay", false); 91 | player.queue.add(track); 92 | if (!player.playing && !player.paused && !player.queue.size) { 93 | return player.play(); 94 | } else { 95 | var l11 = await client.translate(message.guild.id,`Kanal`) 96 | var l12 = await client.translate(message.guild.id,`Ekliyen Kişi`) 97 | var l13 = await client.translate(message.guild.id,`Süre`) 98 | var l14 = await client.translate(message.guild.id,`Kuyruğa Şarkı Eklendi`) 99 | var embed = new EmbedBuilder().setColor("Random").setTimestamp().addFields([ 100 | { name: `${l11}`, value: `${track.author}`, inline: true }, 101 | { name: `${l12}`, value: `<@${track.requester.id}>`, inline: true }, 102 | { name: `${l13}`, value: `**\`[${convertTime(track.duration)}]\`**`, inline: true } 103 | ]).setAuthor({ name: `🎵 ${l14}`, iconURL: message.author.avatarURL({ dynamic: true }) }).setThumbnail(`https://img.youtube.com/vi/${track.identifier}/mqdefault.jpg`).setTitle(`**${track.title}**`).setURL(`https://img.youtube.com/vi/${track.identifier}/mqdefault.jpg`) 104 | return message.channel.send({ embeds: [embed] }); 105 | } 106 | } 107 | } 108 | } -------------------------------------------------------------------------------- /commands/Music/queue.js: -------------------------------------------------------------------------------- 1 | const { EmbedBuilder, ButtonBuilder, ActionRowBuilder, ButtonStyle } = require("discord.js"); 2 | const pms = require("pretty-ms"); 3 | const load = require("lodash"); 4 | module.exports = { 5 | name: "queue", 6 | category: "Music", 7 | aliases: ["q","kuyruk","liste"], 8 | description: "Show the music queue and now playing.", 9 | args: false, 10 | owner: false, 11 | player: true, 12 | inVoiceChannel: false, 13 | sameVoiceChannel: false, 14 | execute: async (message, args, client, prefix) => { 15 | 16 | const player = client.manager.get(message.guild.id); 17 | var l1 = await client.translate(message.guild.id,`Çalan Bir Şarkı Bulunmamakta.`) 18 | if(!player) return message.channel.send({content:`**${l1}**`}) 19 | if(!player.queue) return message.channel.send({content:`**${l1}**`}) 20 | 21 | if(player.queue.length === "0" || !player.queue.length) { 22 | var l2 = await client.translate(message.guild.id,`Şuan Çalan`) 23 | const embed = new EmbedBuilder() 24 | .setColor("Random") 25 | .setThumbnail(player.queue.current.displayThumbnail("mqdefault")) 26 | .setDescription(`**${l2}**\n[${player.queue.current.title}](${player.queue.current.uri}) • \`[${pms(player.position)} / ${pms(player.queue.current.duration)} ]\` • ${player.queue.current.requester}`) 27 | 28 | await message.channel.send({embeds: [embed]}).catch((err) => { }); 29 | } else { 30 | const queuedSongs = player.queue.map((t, i) => `\`${++i}\` • [${t.title}](${message.url}) • \`[ ${pms(t.duration)} ]\` • ${t.requester}`); 31 | const mapping = load.chunk(queuedSongs, 10); 32 | const pages = mapping.map((s) => s.join("\n")); 33 | let page = 0; 34 | 35 | if(player.queue.size < 11) { 36 | var l3 = await client.translate(message.guild.id,`Şuan Çalan`) 37 | var l4 = await client.translate(message.guild.id,`Listedeki Şarkılar`) 38 | var l5 = await client.translate(message.guild.id,`Sayfa`) 39 | var l6 = await client.translate(message.guild.id,`Listesi`) 40 | const embed = new EmbedBuilder() 41 | .setColor("Random") 42 | .setDescription(`**${l3}**\n[${player.queue.current.title}](${player.queue.current.uri}) • \`[ ${pms(player.position)} / ${pms(player.queue.current.duration)} ]\` • ${player.queue.current.requester}\n\n**${l4}**\n${pages[page]}`) 43 | .setTimestamp() 44 | .setFooter({text:`${l5} ${page + 1}/${pages.length}`,iconURL: message.author.displayAvatarURL({ dynamic: true })}) 45 | .setThumbnail(player.queue.current.displayThumbnail("mqdefault")) 46 | .setTitle(`${message.guild.name} ${l6}`) 47 | 48 | await message.channel.send({embeds: [embed]}) 49 | } else { 50 | var l7 = await client.translate(message.guild.id,`Şuan Çalan`) 51 | var l8 = await client.translate(message.guild.id,`Listedeki Şarkılar`) 52 | var l9 = await client.translate(message.guild.id,`Sayfa`) 53 | var l10 = await client.translate(message.guild.id,`Listesi`) 54 | const embed2 = new EmbedBuilder() 55 | .setColor("Random") 56 | .setDescription(`**${l7}**\n[${player.queue.current.title}](${player.queue.current.uri}) • \`[ ${pms(player.position)} / ${pms(player.queue.current.duration)} ]\` • ${player.queue.current.requester}\n\n**${l8}**\n${pages[page]}`) 57 | .setTimestamp() 58 | .setFooter({text:`${l9} ${page + 1}/${pages.length}`,iconURL:message.author.displayAvatarURL({ dynamic: true })}) 59 | .setThumbnail(player.queue.current.displayThumbnail("mqdefault")) 60 | .setTitle(`${message.guild.name} ${l10}`) 61 | 62 | const but1 = new ButtonBuilder() 63 | .setCustomId("queue_cmd_but_1") 64 | .setEmoji("⬅️") 65 | .setStyle(ButtonStyle.Primary) 66 | 67 | const but2 = new ButtonBuilder() 68 | .setCustomId("queue_cmd_but_2") 69 | .setEmoji("➡️") 70 | .setStyle(ButtonStyle.Primary) 71 | 72 | const but3 = new ButtonBuilder() 73 | .setCustomId("queue_cmd_but_3") 74 | .setEmoji("🗑️") 75 | .setStyle(ButtonStyle.Danger) 76 | 77 | const row1 = new ActionRowBuilder().addComponents([but2, but3, but1]); 78 | 79 | const msg = await message.channel.send({embeds: [embed2],components: [row1]}) 80 | 81 | const collector = msg.createMessageComponentCollector({ 82 | filter: async(b) => { 83 | if(b.user.id === message.author.id) return true; 84 | else { 85 | var l11 = await client.translate(message.guild.id,`Sadece ${message.author.username} Butonu Kullanabilir,Komudu Tekrar Kullanın.`) 86 | b.reply({ 87 | ephemeral: true, 88 | content: `**${l11}**` 89 | }); 90 | return false; 91 | }; 92 | },time: 60000*5,idle: 30e3}); 93 | 94 | collector.on("collect", async (button) => { 95 | if(button.customId === "queue_cmd_but_1") { 96 | await button.deferUpdate().catch(() => {}); 97 | page = page + 1 < pages.length ? ++page : 0; 98 | 99 | var l12 = await client.translate(message.guild.id,`Şuan Çalan`) 100 | var l13 = await client.translate(message.guild.id,`Listedeki Şarkılar`) 101 | var l14 = await client.translate(message.guild.id,`Sayfa`) 102 | var l15 = await client.translate(message.guild.id,`Listesi`) 103 | const embed3 = new EmbedBuilder() 104 | .setColor("Random") 105 | .setDescription(`**${l12}**\n[${player.queue.current.title}](${player.queue.current.uri}) • \`[ ${pms(player.position)} / ${pms(player.queue.current.duration)} ]\` • ${player.queue.current.requester}\n\n**${l13}**\n${pages[page]}`) 106 | .setTimestamp() 107 | .setFooter({text:`${l14} ${page + 1}/${pages.length}`,iconURL:message.author.displayAvatarURL({ dynamic: true })}) 108 | .setThumbnail(player.queue.current.displayThumbnail("mqdefault")) 109 | .setTitle(`${message.guild.name} ${l15}`) 110 | 111 | await msg.edit({embeds: [embed3],components: [row1]}) 112 | } else if(button.customId === "queue_cmd_but_2") { 113 | await button.deferUpdate().catch(() => {}); 114 | page = page > 0 ? --page : pages.length - 1; 115 | var l16 = await client.translate(message.guild.id,`Şuan Çalan`) 116 | var l17 = await client.translate(message.guild.id,`Listedeki Şarkılar`) 117 | var l18 = await client.translate(message.guild.id,`Sayfa`) 118 | var l19 = await client.translate(message.guild.id,`Listesi`) 119 | const embed4 = new EmbedBuilder() 120 | .setColor("Random") 121 | .setDescription(`**${l16}**\n[${player.queue.current.title}](${player.queue.current.uri}) • \`[ ${pms(player.position)} / ${pms(player.queue.current.duration)} ]\` • ${player.queue.current.requester}\n\n**${l17}**\n${pages[page]}`) 122 | .setTimestamp() 123 | .setFooter({text:`${l18} ${page + 1}/${pages.length}`,iconURL:message.author.displayAvatarURL({ dynamic: true })}) 124 | .setThumbnail(player.queue.current.displayThumbnail("mqdefault")) 125 | .setTitle(`${message.guild.name} ${l19}`) 126 | 127 | await msg.edit({embeds: [embed4],components: [row1]}).catch(() => {}); 128 | } else if(button.customId === "queue_cmd_but_3") { 129 | await button.deferUpdate().catch(() => {}); 130 | collector.stop(); 131 | } else return; 132 | }); 133 | 134 | collector.on("end", async () => { 135 | await msg.edit({components: []}) 136 | }); 137 | } 138 | } 139 | } 140 | }; -------------------------------------------------------------------------------- /commands/Music/remove.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | name: "remove", 3 | aliases: ["kaldır"], 4 | category: "Music", 5 | description: "Remove song from the queue", 6 | args: false, 7 | usage: "", 8 | owner: false, 9 | player: true, 10 | inVoiceChannel: true, 11 | sameVoiceChannel: true, 12 | execute: async (message, args, client, prefix) => { 13 | const player = message.client.manager.get(message.guild.id); 14 | var l1 = await client.translate(message.guild.id,`Çalan Bir Şarkı Bulunmamakta.`) 15 | if (!player.queue.current)return message.channel.send({content:`**${l1}**`}) 16 | const position = (Number(args[0]) - 1); 17 | if (position > player.queue.size) { 18 | const number = (position + 1); 19 | var l2 = await client.translate(message.guild.id,`${number} Numaralı Bir Şarkı Bulunmamakta. Tüm Şarkılar \`${player.queue.size}\``) 20 | return message.channel.send({content:`**${l2}**`}); 21 | } 22 | var l3 = await client.translate(message.guild.id,`👌 Kaldırıldı`) 23 | return message.channel.send({content:`**${l3}**`}); 24 | } 25 | }; -------------------------------------------------------------------------------- /commands/Music/resume.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | name: "resume", 3 | aliases: ["r","devam"], 4 | category: "Music", 5 | description: "Resume currently playing music", 6 | args: false, 7 | usage: "", 8 | owner: false, 9 | player: true, 10 | inVoiceChannel: true, 11 | sameVoiceChannel: true, 12 | execute: async (message, args, client, prefix) => { 13 | const player = message.client.manager.get(message.guild.id); 14 | var l1 = await client.translate(message.guild.id,`Çalan Bir Şarkı Bulunmamakta.`) 15 | if (!player.queue.current) return message.channel.send({content:`**${l1}**`}) 16 | var l2 = await client.translate(message.guild.id,`Zaten Oynatılıyor..`) 17 | if (!player.paused) return message.channel.send({content:`**${l2}**`}); 18 | player.pause(false); 19 | return; 20 | } 21 | }; -------------------------------------------------------------------------------- /commands/Music/shuffle.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | name: "shuffle", 3 | aliases: ["karıştır"], 4 | category: "Music", 5 | description: "Shuffle queue", 6 | args: false, 7 | owner: false, 8 | player: true, 9 | inVoiceChannel: true, 10 | sameVoiceChannel: true, 11 | execute: async (message, args, client, prefix) => { 12 | const player = message.client.manager.get(message.guild.id); 13 | var l1 = await client.translate(message.guild.id,`Çalan Bir Şarkı Bulunmamakta.`) 14 | if (!player.queue.current)return message.channel.send({content:`**${l1}**`}); 15 | player.queue.shuffle(); 16 | var l2 = await client.translate(message.guild.id,`👌 Liste Karıştırıldı`) 17 | return message.channel.send({content:`**${l2}**`}) 18 | } 19 | }; -------------------------------------------------------------------------------- /commands/Music/skip.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | name: "skip", 3 | aliases: ["s","geç","atla"], 4 | category: "Music", 5 | description: "Skip the currently playing song", 6 | args: false, 7 | owner: false, 8 | player: true, 9 | inVoiceChannel: true, 10 | sameVoiceChannel: true, 11 | execute: async (message, args, client, prefix) => { 12 | const player = message.client.manager.get(message.guild.id); 13 | var l1 = await client.translate(message.guild.id,`Çalan Bir Şarkı Bulunmamakta.`) 14 | if (!player.queue.current) return message.channel.send({content:`**${l1}**`}); 15 | const autoplay = player.get("autoplay"); 16 | if (autoplay === false) { 17 | player.stop(); 18 | } else { 19 | player.stop(); 20 | player.queue.clear(); 21 | player.set("autoplay", false); 22 | } 23 | return; 24 | 25 | } 26 | }; -------------------------------------------------------------------------------- /commands/Music/skipto.js: -------------------------------------------------------------------------------- 1 | const { EmbedBuilder } = require("discord.js"); 2 | module.exports = { 3 | name: "skipto", 4 | aliases: ["jump","geçiş"], 5 | category: "Music", 6 | description: "Forward song", 7 | args: true, 8 | usage: "", 9 | player: true, 10 | inVoiceChannel: true, 11 | sameVoiceChannel: true, 12 | execute: async (message, args, client, prefix) => { 13 | const player = message.client.manager.get(message.guild.id); 14 | var l1 = await client.translate(message.guild.id,`Çalan Bir Şarkı Bulunmamakta.`) 15 | if (!player.queue.current) return message.channel.send({content:`**${l1}**`}); 16 | const position = Number(args[0]); 17 | var l2 = await client.translate(message.guild.id,`Kullanım \`${message.client.prefix}geçiş <Şarkı Sayısı>\``) 18 | if (!position || position < 0 || position > player.queue.size) return message.channel.send({content:`**${l2}**`}); 19 | var l3 = await client.translate(message.guild.id,`\`${position}\` Sırasındaki Şarkıya Atlandı.`) 20 | player.queue.remove(0, position - 1); 21 | player.stop(); 22 | return message.channel.send({content:`**${l3}**`}); 23 | 24 | } 25 | }; -------------------------------------------------------------------------------- /commands/Music/stop.js: -------------------------------------------------------------------------------- 1 | const { EmbedBuilder } = require("discord.js"); 2 | module.exports = { 3 | name: "stop", 4 | aliases: ["kapat"], 5 | category: "Music", 6 | description: "Çalan Müziği Sonlandırır Ve Kuyruğu Temizler.", 7 | args: false, 8 | player: true, 9 | inVoiceChannel: true, 10 | sameVoiceChannel: true, 11 | execute: async (message, args, client, prefix) => { 12 | 13 | const player = message.client.manager.get(message.guild.id); 14 | var l1 = await client.translate(message.guild.id,`Çalan Bir Şarkı Bulunmamakta.`) 15 | if (!player.queue.current) return message.channel.send({content:`**${l1}**`}); 16 | var l2 = await client.translate(message.guild.id,`Müzik Kapatıldı!`) 17 | player.stop(); 18 | player.queue.clear(); 19 | message.channel.send({content:`**✅ ${l2}**`}); 20 | 21 | } 22 | }; -------------------------------------------------------------------------------- /commands/Music/volume.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | name: "volume", 3 | aliases: ["v", "vol","ses"], 4 | category: "Music", 5 | description: "Çalan Şarkının Sesini Yükseltir/Azaltır.", 6 | args: false, 7 | player: true, 8 | inVoiceChannel: true, 9 | sameVoiceChannel: true, 10 | execute: async (message, args, client, prefix) => { 11 | 12 | const player = message.client.manager.get(message.guild.id); 13 | var l1 = await client.translate(message.guild.id,`Çalan Bir Şarkı Bulunmamakta.`) 14 | if (!player.queue.current) return message.channel.send({content:`**${l1}**`}); 15 | var l2 = await client.translate(message.guild.id,`Şuanki Ses Düzeyi \`%${player.volume}\``) 16 | if (!args.length)return message.channel.send({content:`**🔉 ${l2}**`}); 17 | const volume = Number(args[0]); 18 | var l3 = await client.translate(message.guild.id,`Doğru Kullanım \`${message.client.prefix}ses <0-200>\``) 19 | if (!volume || volume < 0 || volume > 200) return message.channel.send({content:`**${l3}**`}); 20 | player.setVolume(volume); 21 | var l4 = await client.translate(message.guild.id,`Ses Düzeyi \`%${volume}\` Olarak Ayarlandı`) 22 | if (volume > player.volume) { 23 | return message.channel.send({content:`**🔉 ${l4}**`}); 24 | } else if (volume < player.volume) { 25 | return message.channel.send({content:`**🔈 ${l4}**`}); 26 | } else { 27 | return message.channel.send({content:`**🔉 ${l4}**`}); 28 | } 29 | 30 | } 31 | }; -------------------------------------------------------------------------------- /config.json: -------------------------------------------------------------------------------- 1 | { 2 | "token":"Your Discord Bot Token", 3 | "prefix": ".", 4 | 5 | "clientID": "Spotify clientID", 6 | "clientSecret": "Spotify clientSecret", 7 | "nodes": [ 8 | { 9 | "host" : "narco.buses.rocks", 10 | "port" : 2269, 11 | "password" : "glasshost1984", 12 | "secure" : false 13 | } 14 | ] 15 | } -------------------------------------------------------------------------------- /events/Client/messageCreate.js: -------------------------------------------------------------------------------- 1 | const { EmbedBuilder } = require("discord.js"); 2 | 3 | module.exports = async (client, message) => { 4 | if (!message.guild || message.author.bot) return; 5 | var prefix = client.prefix; 6 | const mention = new RegExp(`^<@!?${client.user.id}>( |)$`); 7 | if (message.content.match(mention)) return message.channel.send({embeds: [new EmbedBuilder().setColor("Random").setDescription(`**Prefixim \`${prefix}\`**`)]}); 8 | 9 | const escapeRegex = (str) => str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); 10 | const prefixRegex = new RegExp(`^(<@!?${client.user.id}>|${escapeRegex(prefix)})\\s*`); 11 | if (!prefixRegex.test(message.content)) return; 12 | const [ matchedPrefix ] = message.content.match(prefixRegex); 13 | const args = message.content.slice(matchedPrefix.length).trim().split(/ +/); 14 | const commandName = args.shift().toLowerCase(); 15 | const command = client.commands.get(commandName) || client.commands.find((cmd) => cmd.aliases && cmd.aliases.includes(commandName)); 16 | if (!command) return; 17 | var l1 = await client.translate(message.guild.id,`Bir Argüman Girmedin. Kullanım`) 18 | if (command.args && !args.length)return message.channel.send({content:`> **${l1} \`${prefix}${command?.name} ${command?.usage}\`**`}); 19 | var lfive = await client.translate(message.guild.id,`Komudu Kullanmak İçin Yeterki Yetkin Bulunmamakta.`) 20 | if (command.permission && !message.member.permissions.has(command.permission)) return message.channel.send(`**${lfive}**`); 21 | const player = message.client.manager.get(message.guild.id) 22 | var l2 = await client.translate(message.guild.id,`Çalan Bir Şarkı Bulunmamakta.`) 23 | if (command.player && !player) return message.channel.send({content:`**${l2}**`}); 24 | var l3 = await client.translate(message.guild.id,`Bir Ses Kanalında Olmalısın!`) 25 | if (command.inVoiceChannel && !message.member.voice.channel) return message.channel.send({content:`**${l3}**`}); 26 | var l4 = await client.translate(message.guild.id,`Müzik Dinliyebilmek İçin Benimle Aynı Kanalda Olmalısın!`) 27 | if (command.sameVoiceChannel && message.member.voice.channel !== message.guild.members.cache.get(client.user.id).voice.channel) return message.channel.send({content:`**${l4}**`}); 28 | 29 | try { 30 | message.react(`🟢`).catch(err => {}) 31 | command.execute(message, args, client, prefix); 32 | } catch (error) { 33 | message.react(`🔴`).catch(err => {}) 34 | var l5 = await client.translate(message.guild.id,`Komut Yüklenirken Bir Hata Gerçekleşti, Daha Sonra Tekrar Deneyiniz`) 35 | return message.channel.send({content:`**⚠️ ${l5}**`}); 36 | } 37 | 38 | } -------------------------------------------------------------------------------- /events/Client/ready.js: -------------------------------------------------------------------------------- 1 | module.exports = async (client) => { 2 | client.manager.init(client.user.id); 3 | console.log(`${client.user.username} Ready!`) 4 | } 5 | -------------------------------------------------------------------------------- /events/Client/voiceStateUpdate.js: -------------------------------------------------------------------------------- 1 | const delay = require("delay"); 2 | 3 | module.exports = async (client, oldState, newState) => { 4 | const player = client.manager?.players.get(newState.guild.id) 5 | if (!player) return 6 | if (!newState.guild.members.cache.get(client.user.id).voice.channelId) player.destroy() 7 | if (oldState.id === client.user.id || !oldState.guild.members.cache.get(client.user.id).voice.channelId) return 8 | if (oldState.guild.members.cache.get(client.user.id).voice.channelId === oldState.channelId) { 9 | if (oldState.guild.members.cache.get(client.user.id).voice?.channel && oldState.guild.members.cache.get(client.user.id).voice.channel.members.filter((m) => !m.user.bot).size === 0) { 10 | await delay(45000) 11 | const voiceMembers = oldState.guild.members.cache.get(client.user.id).voice.channel?.members.size 12 | if (!voiceMembers || voiceMembers == 1) { 13 | const newPlayer = client.manager?.players.get(newState.guild.id) 14 | newPlayer ? player.destroy() : oldState.guild.members.cache.get(client.user.id).voice.channel.leave() 15 | try { 16 | const channel = client.channels.cache.get(player.textChannel) 17 | 18 | var l1 = await client.translate(message.guild.id,`<#${oldState.guild.members.cache.get(client.user.id).voice.channel.id}> Kanalından Ayrıldım Çünkü Kanalda Kişi Olmadığı Halda Yeterince Uzun Durdum.`) 19 | if (channel) channel.send({ content: `📤 **${l1}**` }) 20 | } catch (err) { 21 | console.log(err.message) 22 | } 23 | } 24 | } 25 | } 26 | 27 | 28 | 29 | }; -------------------------------------------------------------------------------- /events/Lavalink/nodeConnect.js: -------------------------------------------------------------------------------- 1 | module.exports = async (client, node) => { 2 | console.log("[🟢] Lavalink / Node Connected!") 3 | } -------------------------------------------------------------------------------- /events/Lavalink/nodeCreate.js: -------------------------------------------------------------------------------- 1 | module.exports = async (client, node) => { 2 | console.log("[🟢] Lavalink / Node Player!") 3 | } -------------------------------------------------------------------------------- /events/Lavalink/nodeDisconnect.js: -------------------------------------------------------------------------------- 1 | module.exports = async (client, node, reason) => { 2 | console.log("[🔴] Lavalink / Node Disconnected Reason; " + reason) 3 | } -------------------------------------------------------------------------------- /events/Lavalink/nodeError.js: -------------------------------------------------------------------------------- 1 | module.exports = async (client, node, error) => { 2 | if(error.message.includes("Unexpected op"))return; 3 | console.log("[🔴] Lavalink / Node Disconnected! Reason; " + error.message) 4 | } -------------------------------------------------------------------------------- /events/Lavalink/nodeReconnect.js: -------------------------------------------------------------------------------- 1 | module.exports = async (client, node) => { 2 | console.log("[🟡] Lavalink / Node Reconnecting..") 3 | } -------------------------------------------------------------------------------- /events/Lavalink/playerMove.js: -------------------------------------------------------------------------------- 1 | const { EmbedBuilder } = require("discord.js"); 2 | module.exports = async (client, player, oldChannel, newChannel) => { 3 | const guild = client.guilds.cache.get(player.guild) 4 | if (!guild) return; 5 | const channel = guild.channels.cache.get(player.textChannel); 6 | if (oldChannel === newChannel) return; 7 | if (newChannel === null || !newChannel) { 8 | if (!player) return; 9 | var l4 = await client.translate(player.guild,`<#${oldChannel}> Kanalından Ayrıldım`) 10 | if (channel) await channel.send({ embeds: [new EmbedBuilder().setColor(`#00ff00`).setDescription(`**${l4}**`)] }) 11 | return player.destroy(); 12 | } else { 13 | player.voiceChannel = newChannel; 14 | if (player.paused) player.pause(false); 15 | var l5 = await client.translate(player.guild,`<#${player.voiceChannel}> Kanalına Geçiş Yaptım`) 16 | if (channel) await channel.send({ embeds: [new EmbedBuilder().setColor(`#00ff00`).setDescription(`**${l5}**`)] }); 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /events/Lavalink/queueEnd.js: -------------------------------------------------------------------------------- 1 | module.exports = async (client, player) => { 2 | const channel = client.channels.cache.get(player.textChannel); 3 | var l1 = await client.translate(player.guild,`👌 Liste Sona Erdi!`) 4 | channel.send(`**${l1}**`); 5 | } -------------------------------------------------------------------------------- /events/Lavalink/socketClosed.js: -------------------------------------------------------------------------------- 1 | module.exports = async (client, player, payload) => { 2 | if (payload.byRemote !== true) return; 3 | console.log(`[⚠️] Socket Disconnected.`) 4 | } -------------------------------------------------------------------------------- /events/Lavalink/trackEnd.js: -------------------------------------------------------------------------------- 1 | module.exports = async (client, player, track, playload) => { 2 | player.set("autoplay", false); 3 | var res = await player.search(`https://www.youtube.com/watch?v=${player.queue.current.identifier}&list=RD${player.queue.current.identifier}`,player.get("requester")); 4 | await player.queue.add(res.tracks[2]); 5 | } -------------------------------------------------------------------------------- /events/Lavalink/trackError.js: -------------------------------------------------------------------------------- 1 | module.exports = async (client, player, track, payload) => { 2 | const channel = client.channels.cache.get(player.textChannel); 3 | var l1 = await client.translate(player.guild,`Çalınacak Şarkıyla İlgili Bir Problem Oluştu!`) 4 | channel.send({ content: `> **⚠️ ${l1}**` }); 5 | if (!player.voiceChannel) player.destroy(); 6 | } -------------------------------------------------------------------------------- /events/Lavalink/trackStart.js: -------------------------------------------------------------------------------- 1 | const { EmbedBuilder } = require("discord.js"); 2 | const { convertTime } = require('../../utils/convert.js'); 3 | module.exports = async (client, player, track, payload) => { 4 | player.set("autoplay", false); 5 | var l1 = await client.translate(player.guild,`Kanal`) 6 | var l2 = await client.translate(player.guild,`Ekliyen Kişi`) 7 | var l3 = await client.translate(player.guild,`Süre`) 8 | var l4 = await client.translate(player.guild,`Oynatılıyor`) 9 | const embed = new EmbedBuilder() 10 | .setColor("Random").setTimestamp() 11 | .addFields([ 12 | { name: `${l1}`, value: `${track.author}`, inline: true }, 13 | { name: `${l2}`, value: `${track?.requester ? `<@${track.requester.id}>` : "Autoplay"}`, inline: true }, 14 | { name: `${l3}`, value: `**\`[${convertTime(track.duration)}]\`**`, inline: true }, 15 | ]).setAuthor({ name: `🎶 ${l4}`, iconURL: track?.requester ? track.requester.avatarURL({ dynamic: true }) : "https://cdn.discordapp.com/emojis/903985373259128873.gif?size=128&quality=lossless" }) 16 | .setThumbnail(track.displayThumbnail("mqdefault")) 17 | .setTitle(`**${track.title}**`).setURL(`${track.uri}`) 18 | 19 | const channel = client.channels.cache.get(player.textChannel); 20 | channel.send({ embeds: [embed] }) 21 | 22 | } -------------------------------------------------------------------------------- /events/Lavalink/trackStuck.js: -------------------------------------------------------------------------------- 1 | module.exports = async (client, player, track, payload) => { 2 | const channel = client.channels.cache.get(player.textChannel); 3 | var l1 = await client.translate(player.guild,`Çalınacak Şarkıyla İlgili Bir Problem Oluştu!`) 4 | channel.send({ content: `> **⚠️ ${l1}**` }); 5 | if (!player.voiceChannel) player.destroy(); 6 | } -------------------------------------------------------------------------------- /fivedb.json: -------------------------------------------------------------------------------- 1 | { 2 | "language-1084846965524795442": "ko" 3 | } -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | const { Client, Collection, GatewayIntentBits, Partials } = require("discord.js"); 2 | const { readdirSync } = require("fs"); 3 | const { JsonDatabase } = require("five.db"); 4 | const { Manager } = require("erela.js"); 5 | const Spotify = require("erela.js-spotify"); 6 | const client = global.client = new Client({ intents: Object.keys(GatewayIntentBits), partials: Object.keys(Partials), allowedMentions: { repliedUser: true, parse: ["everyone", "roles", "users"] } }); 7 | const db = client.db = new JsonDatabase(); 8 | 9 | module.exports = client 10 | client.commands = new Collection(); 11 | client.config = require("./config.json"); 12 | client.prefix = client.config.prefix; 13 | client.aliases = new Collection(); 14 | client.commands = new Collection(); 15 | client.categories = readdirSync("./commands/"); 16 | client.logger = require("./utils/logger.js"); 17 | 18 | client.manager = new Manager({ 19 | nodes: client.config.nodes, 20 | send: (id, payload) => { 21 | const guild = client.guilds.cache.get(id); 22 | if (guild) guild.shard.send(payload); 23 | }, 24 | autoPlay: true, 25 | plugins: [new Spotify({ 26 | clientID: client.config.clientID, 27 | clientSecret: client.config.clientSecret, 28 | })] 29 | }); 30 | 31 | const translate = require('node-google-translate-skidz'); 32 | client.translate = async function (guild, text) { 33 | try { 34 | var data = db.get(`language-${guild}`); 35 | var res; 36 | if (!data) res = text; 37 | if (data) { 38 | var trans = await translate({ text: `${text}`, source: `tr`, target: `${data}` }) 39 | res = trans.translation; 40 | } 41 | return res; 42 | } catch (error) { 43 | return text 44 | } 45 | } 46 | 47 | 48 | client.on("raw", (d) => client.manager.updateVoiceState(d)); 49 | client.on("disconnect", () => console.log("Bot Disconnected!")) 50 | client.on("reconnecting", () => console.log("Bot Reconnecting..")) 51 | client.on('warn', error => console.log(error)); 52 | client.on('error', error => console.log(error)); 53 | process.on('unhandledRejection', error => console.log(error)); 54 | process.on('uncaughtException', error => console.log(error)); 55 | 56 | 57 | readdirSync("./events/Client/").forEach(file => { 58 | const event = require(`./events/Client/${file}`); 59 | let eventName = file.split(".")[0]; 60 | console.log(`[CLIENT] Event ${eventName}`); 61 | client.on(eventName, event.bind(null, client)); 62 | }); 63 | 64 | readdirSync("./events/Lavalink/").forEach(file => { 65 | const event = require(`./events/Lavalink/${file}`); 66 | let eventName = file.split(".")[0]; 67 | console.log(`[LAVA] Event ${eventName}`); 68 | client.manager.on(eventName, event.bind(null, client)); 69 | }); 70 | 71 | readdirSync("./commands/").forEach(dir => { 72 | const commandFiles = readdirSync(`./commands/${dir}/`).filter(f => f.endsWith('.js')); 73 | for (const file of commandFiles) { 74 | const command = require(`./commands/${dir}/${file}`); 75 | console.log(`[COMMAND] ${command.category} | ${command.name}`); 76 | client.commands.set(command.name, command); 77 | } 78 | }); 79 | 80 | client.login(client.config.token); -------------------------------------------------------------------------------- /lang.json: -------------------------------------------------------------------------------- 1 | { 2 | 3 | "all":[ 4 | {"code":"ab","name":"Abkhaz","nativeName":"аҧсуа"}, 5 | {"code":"aa","name":"Afar","nativeName":"Afaraf"}, 6 | {"code":"af","name":"Afrikaans","nativeName":"Afrikaans"}, 7 | {"code":"ak","name":"Akan","nativeName":"Akan"}, 8 | {"code":"sq","name":"Albanian","nativeName":"Shqip"}, 9 | {"code":"am","name":"Amharic","nativeName":"አማርኛ"}, 10 | {"code":"ar","name":"Arabic","nativeName":"العربية"}, 11 | {"code":"an","name":"Aragonese","nativeName":"Aragonés"}, 12 | {"code":"hy","name":"Armenian","nativeName":"Հայերեն"}, 13 | {"code":"as","name":"Assamese","nativeName":"অসমীয়া"}, 14 | {"code":"av","name":"Avaric","nativeName":"авар мацӀ, магӀарул мацӀ"}, 15 | {"code":"ae","name":"Avestan","nativeName":"avesta"}, 16 | {"code":"ay","name":"Aymara","nativeName":"aymar aru"}, 17 | {"code":"az","name":"Azerbaijani","nativeName":"azərbaycan dili"}, 18 | {"code":"bm","name":"Bambara","nativeName":"bamanankan"}, 19 | {"code":"ba","name":"Bashkir","nativeName":"башҡорт теле"}, 20 | {"code":"eu","name":"Basque","nativeName":"euskara, euskera"}, 21 | {"code":"be","name":"Belarusian","nativeName":"Беларуская"}, 22 | {"code":"bn","name":"Bengali","nativeName":"বাংলা"}, 23 | {"code":"bh","name":"Bihari","nativeName":"भोजपुरी"}, 24 | {"code":"bi","name":"Bislama","nativeName":"Bislama"}, 25 | {"code":"bs","name":"Bosnian","nativeName":"bosanski jezik"}, 26 | {"code":"br","name":"Breton","nativeName":"brezhoneg"}, 27 | {"code":"bg","name":"Bulgarian","nativeName":"български език"}, 28 | {"code":"my","name":"Burmese","nativeName":"ဗမာစာ"}, 29 | {"code":"ca","name":"Catalan; Valencian","nativeName":"Català"}, 30 | {"code":"ch","name":"Chamorro","nativeName":"Chamoru"}, 31 | {"code":"ce","name":"Chechen","nativeName":"нохчийн мотт"}, 32 | {"code":"ny","name":"Chichewa; Chewa; Nyanja","nativeName":"chiCheŵa, chinyanja"}, 33 | {"code":"zh","name":"Chinese","nativeName":"中文 (Zhōngwén), 汉语, 漢語"}, 34 | {"code":"cv","name":"Chuvash","nativeName":"чӑваш чӗлхи"}, 35 | {"code":"kw","name":"Cornish","nativeName":"Kernewek"}, 36 | {"code":"co","name":"Corsican","nativeName":"corsu, lingua corsa"}, 37 | {"code":"cr","name":"Cree","nativeName":"ᓀᐦᐃᔭᐍᐏᐣ"}, 38 | {"code":"hr","name":"Croatian","nativeName":"hrvatski"}, 39 | {"code":"cs","name":"Czech","nativeName":"česky, čeština"}, 40 | {"code":"da","name":"Danish","nativeName":"dansk"}, 41 | {"code":"dv","name":"Divehi; Dhivehi; Maldivian;","nativeName":"ދިވެހި"}, 42 | {"code":"nl","name":"Dutch","nativeName":"Nederlands, Vlaams"}, 43 | {"code":"en","name":"English","nativeName":"English"}, 44 | {"code":"eo","name":"Esperanto","nativeName":"Esperanto"}, 45 | {"code":"et","name":"Estonian","nativeName":"eesti, eesti keel"}, 46 | {"code":"ee","name":"Ewe","nativeName":"Eʋegbe"}, 47 | {"code":"fo","name":"Faroese","nativeName":"føroyskt"}, 48 | {"code":"fj","name":"Fijian","nativeName":"vosa Vakaviti"}, 49 | {"code":"fi","name":"Finnish","nativeName":"suomi, suomen kieli"}, 50 | {"code":"fr","name":"French","nativeName":"français, langue française"}, 51 | {"code":"ff","name":"Fula; Fulah; Pulaar; Pular","nativeName":"Fulfulde, Pulaar, Pular"}, 52 | {"code":"gl","name":"Galician","nativeName":"Galego"}, 53 | {"code":"ka","name":"Georgian","nativeName":"ქართული"}, 54 | {"code":"de","name":"German","nativeName":"Deutsch"}, 55 | {"code":"el","name":"Greek, Modern","nativeName":"Ελληνικά"}, 56 | {"code":"gn","name":"Guaraní","nativeName":"Avañeẽ"}, 57 | {"code":"gu","name":"Gujarati","nativeName":"ગુજરાતી"}, 58 | {"code":"ht","name":"Haitian; Haitian Creole","nativeName":"Kreyòl ayisyen"}, 59 | {"code":"ha","name":"Hausa","nativeName":"Hausa, هَوُسَ"}, 60 | {"code":"he","name":"Hebrew (modern)","nativeName":"עברית"}, 61 | {"code":"hz","name":"Herero","nativeName":"Otjiherero"}, 62 | {"code":"hi","name":"Hindi","nativeName":"हिन्दी, हिंदी"}, 63 | {"code":"ho","name":"Hiri Motu","nativeName":"Hiri Motu"}, 64 | {"code":"hu","name":"Hungarian","nativeName":"Magyar"}, 65 | {"code":"ia","name":"Interlingua","nativeName":"Interlingua"}, 66 | {"code":"id","name":"Indonesian","nativeName":"Bahasa Indonesia"}, 67 | {"code":"ie","name":"Interlingue","nativeName":"Originally called Occidental; then Interlingue after WWII"}, 68 | {"code":"ga","name":"Irish","nativeName":"Gaeilge"}, 69 | {"code":"ig","name":"Igbo","nativeName":"Asụsụ Igbo"}, 70 | {"code":"ik","name":"Inupiaq","nativeName":"Iñupiaq, Iñupiatun"}, 71 | {"code":"io","name":"Ido","nativeName":"Ido"}, 72 | {"code":"is","name":"Icelandic","nativeName":"Íslenska"}, 73 | {"code":"it","name":"Italian","nativeName":"Italiano"}, 74 | {"code":"iu","name":"Inuktitut","nativeName":"ᐃᓄᒃᑎᑐᑦ"}, 75 | {"code":"ja","name":"Japanese","nativeName":"日本語 (にほんご/にっぽんご)"}, 76 | {"code":"jv","name":"Javanese","nativeName":"basa Jawa"}, 77 | {"code":"kl","name":"Kalaallisut, Greenlandic","nativeName":"kalaallisut, kalaallit oqaasii"}, 78 | {"code":"kn","name":"Kannada","nativeName":"ಕನ್ನಡ"}, 79 | {"code":"kr","name":"Kanuri","nativeName":"Kanuri"}, 80 | {"code":"ks","name":"Kashmiri","nativeName":"कश्मीरी, كشميري‎"}, 81 | {"code":"kk","name":"Kazakh","nativeName":"Қазақ тілі"}, 82 | {"code":"km","name":"Khmer","nativeName":"ភាសាខ្មែរ"}, 83 | {"code":"ki","name":"Kikuyu, Gikuyu","nativeName":"Gĩkũyũ"}, 84 | {"code":"rw","name":"Kinyarwanda","nativeName":"Ikinyarwanda"}, 85 | {"code":"ky","name":"Kirghiz, Kyrgyz","nativeName":"кыргыз тили"}, 86 | {"code":"kv","name":"Komi","nativeName":"коми кыв"}, 87 | {"code":"kg","name":"Kongo","nativeName":"KiKongo"}, 88 | {"code":"ko","name":"Korean","nativeName":"한국어 (韓國語), 조선말 (朝鮮語)"}, 89 | {"code":"ku","name":"Kurdish","nativeName":"Kurdî, كوردی‎"}, 90 | {"code":"kj","name":"Kwanyama, Kuanyama","nativeName":"Kuanyama"}, 91 | {"code":"la","name":"Latin","nativeName":"latine, lingua latina"}, 92 | {"code":"lb","name":"Luxembourgish, Letzeburgesch","nativeName":"Lëtzebuergesch"}, 93 | {"code":"lg","name":"Luganda","nativeName":"Luganda"}, 94 | {"code":"li","name":"Limburgish, Limburgan, Limburger","nativeName":"Limburgs"}, 95 | {"code":"ln","name":"Lingala","nativeName":"Lingála"}, 96 | {"code":"lo","name":"Lao","nativeName":"ພາສາລາວ"}, 97 | {"code":"lt","name":"Lithuanian","nativeName":"lietuvių kalba"}, 98 | {"code":"lu","name":"Luba-Katanga","nativeName":""}, 99 | {"code":"lv","name":"Latvian","nativeName":"latviešu valoda"}, 100 | {"code":"gv","name":"Manx","nativeName":"Gaelg, Gailck"}, 101 | {"code":"mk","name":"Macedonian","nativeName":"македонски јазик"}, 102 | {"code":"mg","name":"Malagasy","nativeName":"Malagasy fiteny"}, 103 | {"code":"ms","name":"Malay","nativeName":"bahasa Melayu, بهاس ملايو‎"}, 104 | {"code":"ml","name":"Malayalam","nativeName":"മലയാളം"}, 105 | {"code":"mt","name":"Maltese","nativeName":"Malti"}, 106 | {"code":"mi","name":"Māori","nativeName":"te reo Māori"}, 107 | {"code":"mr","name":"Marathi (Marāṭhī)","nativeName":"मराठी"}, 108 | {"code":"mh","name":"Marshallese","nativeName":"Kajin M̧ajeļ"}, 109 | {"code":"mn","name":"Mongolian","nativeName":"монгол"}, 110 | {"code":"na","name":"Nauru","nativeName":"Ekakairũ Naoero"}, 111 | {"code":"nv","name":"Navajo, Navaho","nativeName":"Diné bizaad, Dinékʼehǰí"}, 112 | {"code":"nb","name":"Norwegian Bokmål","nativeName":"Norsk bokmål"}, 113 | {"code":"nd","name":"North Ndebele","nativeName":"isiNdebele"}, 114 | {"code":"ne","name":"Nepali","nativeName":"नेपाली"}, 115 | {"code":"ng","name":"Ndonga","nativeName":"Owambo"}, 116 | {"code":"nn","name":"Norwegian Nynorsk","nativeName":"Norsk nynorsk"}, 117 | {"code":"no","name":"Norwegian","nativeName":"Norsk"}, 118 | {"code":"ii","name":"Nuosu","nativeName":"ꆈꌠ꒿ Nuosuhxop"}, 119 | {"code":"nr","name":"South Ndebele","nativeName":"isiNdebele"}, 120 | {"code":"oc","name":"Occitan","nativeName":"Occitan"}, 121 | {"code":"oj","name":"Ojibwe, Ojibwa","nativeName":"ᐊᓂᔑᓈᐯᒧᐎᓐ"}, 122 | {"code":"cu","name":"Old Church Slavonic, Church Slavic, Church Slavonic, Old Bulgarian, Old Slavonic","nativeName":"ѩзыкъ словѣньскъ"}, 123 | {"code":"om","name":"Oromo","nativeName":"Afaan Oromoo"}, 124 | {"code":"or","name":"Oriya","nativeName":"ଓଡ଼ିଆ"}, 125 | {"code":"os","name":"Ossetian, Ossetic","nativeName":"ирон æвзаг"}, 126 | {"code":"pa","name":"Panjabi, Punjabi","nativeName":"ਪੰਜਾਬੀ, پنجابی‎"}, 127 | {"code":"pi","name":"Pāli","nativeName":"पाऴि"}, 128 | {"code":"fa","name":"Persian","nativeName":"فارسی"}, 129 | {"code":"pl","name":"Polish","nativeName":"polski"}, 130 | {"code":"ps","name":"Pashto, Pushto","nativeName":"پښتو"}, 131 | {"code":"pt","name":"Portuguese","nativeName":"Português"}, 132 | {"code":"qu","name":"Quechua","nativeName":"Runa Simi, Kichwa"}, 133 | {"code":"rm","name":"Romansh","nativeName":"rumantsch grischun"}, 134 | {"code":"rn","name":"Kirundi","nativeName":"kiRundi"}, 135 | {"code":"ro","name":"Romanian, Moldavian, Moldovan","nativeName":"română"}, 136 | {"code":"ru","name":"Russian","nativeName":"русский язык"}, 137 | {"code":"sa","name":"Sanskrit (Saṁskṛta)","nativeName":"संस्कृतम्"}, 138 | {"code":"sc","name":"Sardinian","nativeName":"sardu"}, 139 | {"code":"sd","name":"Sindhi","nativeName":"सिन्धी, سنڌي، سندھی‎"}, 140 | {"code":"se","name":"Northern Sami","nativeName":"Davvisámegiella"}, 141 | {"code":"sm","name":"Samoan","nativeName":"gagana faa Samoa"}, 142 | {"code":"sg","name":"Sango","nativeName":"yângâ tî sängö"}, 143 | {"code":"sr","name":"Serbian","nativeName":"српски језик"}, 144 | {"code":"gd","name":"Scottish Gaelic; Gaelic","nativeName":"Gàidhlig"}, 145 | {"code":"sn","name":"Shona","nativeName":"chiShona"}, 146 | {"code":"si","name":"Sinhala, Sinhalese","nativeName":"සිංහල"}, 147 | {"code":"sk","name":"Slovak","nativeName":"slovenčina"}, 148 | {"code":"sl","name":"Slovene","nativeName":"slovenščina"}, 149 | {"code":"so","name":"Somali","nativeName":"Soomaaliga, af Soomaali"}, 150 | {"code":"st","name":"Southern Sotho","nativeName":"Sesotho"}, 151 | {"code":"es","name":"Spanish; Castilian","nativeName":"español, castellano"}, 152 | {"code":"su","name":"Sundanese","nativeName":"Basa Sunda"}, 153 | {"code":"sw","name":"Swahili","nativeName":"Kiswahili"}, 154 | {"code":"ss","name":"Swati","nativeName":"SiSwati"}, 155 | {"code":"sv","name":"Swedish","nativeName":"svenska"}, 156 | {"code":"ta","name":"Tamil","nativeName":"தமிழ்"}, 157 | {"code":"te","name":"Telugu","nativeName":"తెలుగు"}, 158 | {"code":"tg","name":"Tajik","nativeName":"тоҷикӣ, toğikī, تاجیکی‎"}, 159 | {"code":"th","name":"Thai","nativeName":"ไทย"}, 160 | {"code":"ti","name":"Tigrinya","nativeName":"ትግርኛ"}, 161 | {"code":"bo","name":"Tibetan Standard, Tibetan, Central","nativeName":"བོད་ཡིག"}, 162 | {"code":"tk","name":"Turkmen","nativeName":"Türkmen, Түркмен"}, 163 | {"code":"tl","name":"Tagalog","nativeName":"Wikang Tagalog, ᜏᜒᜃᜅ᜔ ᜆᜄᜎᜓᜄ᜔"}, 164 | {"code":"tn","name":"Tswana","nativeName":"Setswana"}, 165 | {"code":"to","name":"Tonga (Tonga Islands)","nativeName":"faka Tonga"}, 166 | {"code":"tr","name":"Turkish","nativeName":"Türkçe"}, 167 | {"code":"ts","name":"Tsonga","nativeName":"Xitsonga"}, 168 | {"code":"tt","name":"Tatar","nativeName":"татарча, tatarça, تاتارچا‎"}, 169 | {"code":"tw","name":"Twi","nativeName":"Twi"}, 170 | {"code":"ty","name":"Tahitian","nativeName":"Reo Tahiti"}, 171 | {"code":"ug","name":"Uighur, Uyghur","nativeName":"Uyƣurqə, ئۇيغۇرچە‎"}, 172 | {"code":"uk","name":"Ukrainian","nativeName":"українська"}, 173 | {"code":"ur","name":"Urdu","nativeName":"اردو"}, 174 | {"code":"uz","name":"Uzbek","nativeName":"zbek, Ўзбек, أۇزبېك‎"}, 175 | {"code":"ve","name":"Venda","nativeName":"Tshivenḓa"}, 176 | {"code":"vi","name":"Vietnamese","nativeName":"Tiếng Việt"}, 177 | {"code":"vo","name":"Volapük","nativeName":"Volapük"}, 178 | {"code":"wa","name":"Walloon","nativeName":"Walon"}, 179 | {"code":"cy","name":"Welsh","nativeName":"Cymraeg"}, 180 | {"code":"wo","name":"Wolof","nativeName":"Wollof"}, 181 | {"code":"fy","name":"Western Frisian","nativeName":"Frysk"}, 182 | {"code":"xh","name":"Xhosa","nativeName":"isiXhosa"}, 183 | {"code":"yi","name":"Yiddish","nativeName":"ייִדיש"}, 184 | {"code":"yo","name":"Yoruba","nativeName":"Yorùbá"}, 185 | {"code":"za","name":"Zhuang, Chuang","nativeName":"Saɯ cueŋƅ, Saw cuengh"} 186 | ] 187 | 188 | } -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "advanced-music-bot", 3 | "version": "1.0.0", 4 | "description": "🎵 Music Bot Supporting All Languages", 5 | "main": "index.js", 6 | "scripts": { 7 | "build": "node build", 8 | "test": "node index.js", 9 | "start": "node index.js" 10 | }, 11 | "engines": { 12 | "node": "16.x" 13 | }, 14 | "repository": { 15 | "type": "git", 16 | "url": "git+https://github.com/Bes-js/advanced-music-bot" 17 | }, 18 | "keywords": [ 19 | "discord", 20 | "advanced-music-bot", 21 | "music", 22 | "music-bot", 23 | "spotify", 24 | "youtube", 25 | "soundcloud", 26 | "lavalink", 27 | "discord-api", 28 | "discord-music", 29 | "discord-music-bot", 30 | "discord-v14", 31 | "discord-v14-music" 32 | ], 33 | "author": "Bes-js", 34 | "license ": "GPL-3.0", 35 | "bugs": "https://github.com/Bes-js/advanced-music-bot", 36 | "homepage": "https://github.com/Bes-js/advanced-music-bot", 37 | "dependencies": { 38 | "delay": "^5.0.0", 39 | "discord.js": "^14.11.0", 40 | "five.db":"^0.0.8", 41 | "erela.js": "^2.3.3", 42 | "erela.js-spotify": "^1.2.0", 43 | "fs": "^0.0.1-security", 44 | "lodash": "^4.17.21", 45 | "lyrics-finder": "^21.7.0", 46 | "moment": "^2.29.1", 47 | "moment-duration-format": "^2.3.2", 48 | "node-google-translate-skidz": "^1.1.2", 49 | "pretty-ms": "^7.0.1" 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /replit.nix: -------------------------------------------------------------------------------- 1 | { pkgs }: { 2 | deps = [ 3 | pkgs.yarn 4 | pkgs.esbuild 5 | pkgs.nodejs-18_x 6 | pkgs.openssl 7 | ]; 8 | } -------------------------------------------------------------------------------- /utils/convert.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | convertTime: function (duration) { 3 | 4 | var milliseconds = parseInt((duration % 1000) / 100), 5 | seconds = parseInt((duration / 1000) % 60), 6 | minutes = parseInt((duration / (1000 * 60)) % 60), 7 | hours = parseInt((duration / (1000 * 60 * 60)) % 24); 8 | 9 | hours = (hours < 10) ? "0" + hours : hours; 10 | minutes = (minutes < 10) ? "0" + minutes : minutes; 11 | seconds = (seconds < 10) ? "0" + seconds : seconds; 12 | 13 | if (duration < 3600000) { 14 | return minutes + ":" + seconds ; 15 | } else { 16 | return hours + ":" + minutes + ":" + seconds ; 17 | } 18 | }, 19 | convertNumber: function (number, decPlaces) { 20 | 21 | decPlaces = Math.pow(10,decPlaces); 22 | 23 | var abbrev = [ "K", "M", "B", "T" ]; 24 | 25 | 26 | for (var i=abbrev.length-1; i>=0; i--) { 27 | 28 | var size = Math.pow(10,(i+1)*3); 29 | 30 | if(size <= number) { 31 | 32 | number = Math.round(number*decPlaces/size)/decPlaces; 33 | 34 | 35 | if((number == 1000) && (i < abbrev.length - 1)) { 36 | number = 1; 37 | i++; 38 | } 39 | 40 | number += abbrev[i]; 41 | 42 | break; 43 | } 44 | } 45 | 46 | return number; 47 | }, 48 | convertHmsToMs: function (hms) { 49 | if (hms.length < 3) { 50 | return hms = ((+a[0]) * 1000) 51 | } else if (hms.length < 6) { 52 | const a = hms.split(':') 53 | return hms = (((+a[0]) * 60 + (+a[1])) * 1000) 54 | } else { 55 | const a = hms.split(':') 56 | return hms = (((+a[0]) * 60 * 60 + (+a[1]) * 60 + (+a[2])) * 1000) 57 | } 58 | } 59 | } -------------------------------------------------------------------------------- /utils/logger.js: -------------------------------------------------------------------------------- 1 | const moment = require("moment"); 2 | module.exports = class Logger { 3 | static log (content) { 4 | const date = `${moment().format("DD-MM-YYYY hh:mm:ss")}`; 5 | console.log(`[${date}] ${content}`); 6 | } 7 | }; -------------------------------------------------------------------------------- /utils/progressbar.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | progressbar: function (total, current, size, line, slider) { 3 | if (current > total) { 4 | const bar = line.repeat(size + 2); 5 | return bar; 6 | } else { 7 | const percentage = current / total; 8 | const progress = Math.round((size * percentage)); 9 | const emptyProgress = size - progress; 10 | const progressText = line.repeat(progress).replace(/.$/, slider); 11 | const emptyProgressText = line.repeat(emptyProgress); 12 | const bar = progressText + emptyProgressText; 13 | return bar; 14 | } 15 | } 16 | 17 | } --------------------------------------------------------------------------------