Compare commits

...

61 Commits
1.0 ... main

Author SHA1 Message Date
af4b175aad Fix node
Some checks are pending
Subsonics - Pipeline/pipeline/head This commit looks good
b/pipeline/head Build started...
2023-07-19 19:48:59 +02:00
1d1818af8d Retore config.json
All checks were successful
Subsonics - Pipeline/pipeline/head This commit looks good
2023-06-19 22:59:34 +02:00
a09ac9281d Supprimer 'src/config.json'
All checks were successful
Subsonics - Pipeline/pipeline/head This commit looks good
2023-06-19 20:54:39 +00:00
f07a6d9386 Merge branch 'main' of https://git.raphix.fr/subsonics/bot
All checks were successful
Subsonics - Pipeline/pipeline/head This commit looks good
2023-06-19 22:53:31 +02:00
5d64331479 Remove old discriminator 2023-06-19 22:53:12 +02:00
e4665c34f9 Mise à jour de 'src/config.json'
All checks were successful
Subsonics - Pipeline/pipeline/head This commit looks good
2023-06-06 07:39:45 +00:00
af53e95349 Enable App for other Codes
All checks were successful
Subsonics - Pipeline/pipeline/head This commit looks good
2023-05-08 18:01:11 +02:00
c1cca39012 Enable App for other Codes
All checks were successful
Subsonics - Pipeline/pipeline/head This commit looks good
2023-05-08 18:00:59 +02:00
0e68a33952 Enable App for other Codes
All checks were successful
Subsonics - Pipeline/pipeline/head This commit looks good
2023-05-08 17:59:34 +02:00
897d3f392b Enable App for other Codes
All checks were successful
Subsonics - Pipeline/pipeline/head This commit looks good
2023-05-08 17:54:53 +02:00
8d978ff1d3 Enable App for other Codes
All checks were successful
Subsonics - Pipeline/pipeline/head This commit looks good
2023-05-08 17:52:27 +02:00
abd33e7cb4 Enable App for other Codes
All checks were successful
Subsonics - Pipeline/pipeline/head This commit looks good
2023-05-08 17:49:57 +02:00
ff10347224 New Version to add Auto Detection of User
All checks were successful
Subsonics - Pipeline/pipeline/head This commit looks good
2023-05-05 19:07:52 +02:00
8d0a41db8f New Version to add Presence
All checks were successful
Subsonics - Pipeline/pipeline/head This commit looks good
2023-05-05 14:14:27 +02:00
8cdfb9c682 New Version to add Presence
All checks were successful
Subsonics - Pipeline/pipeline/head This commit looks good
2023-05-05 14:13:14 +02:00
cdf5f0cf84 New Version to add Presence
All checks were successful
Subsonics - Pipeline/pipeline/head This commit looks good
2023-05-05 14:11:28 +02:00
1a44f8d8db Add new HTML Window to close Nav FIX 3
All checks were successful
Subsonics - Pipeline/pipeline/head This commit looks good
2023-05-04 18:32:19 +02:00
2c79ec369e Add new HTML Window to close Nav FIX 2
All checks were successful
Subsonics - Pipeline/pipeline/head This commit looks good
2023-05-04 18:31:18 +02:00
ba52480694 Add new HTML Window to close Nav FIX
All checks were successful
Subsonics - Pipeline/pipeline/head This commit looks good
2023-05-04 18:28:40 +02:00
cadfe8e572 Add new HTML Window to close Nav
All checks were successful
Subsonics - Pipeline/pipeline/head This commit looks good
2023-05-04 18:26:23 +02:00
14d57184bf Add 7.7
All checks were successful
Subsonics - Pipeline/pipeline/head This commit looks good
2023-04-30 19:01:44 +02:00
332e550b08 Add Bugreport
All checks were successful
Subsonics - Pipeline/pipeline/head This commit looks good
2023-04-30 12:36:52 +02:00
71e845bf99 Change node
All checks were successful
Subsonics - Pipeline/pipeline/head This commit looks good
2023-04-29 18:33:52 +02:00
4b145910c8 Change node
All checks were successful
Subsonics - Pipeline/pipeline/head This commit looks good
2023-04-29 18:28:43 +02:00
84cba5fdd4 7.0 Build 1
All checks were successful
Subsonics - Pipeline/pipeline/head This commit looks good
2023-04-29 14:43:07 +02:00
b18703d760 1.1.1 Official Version
All checks were successful
Subsonics - Pipeline/pipeline/head This commit looks good
2023-04-28 21:25:14 +02:00
0fb1d23184 Fix Volume
All checks were successful
Subsonics - Pipeline/pipeline/head This commit looks good
2023-04-28 17:25:01 +02:00
28ec915144 V6
All checks were successful
Subsonics - Pipeline/pipeline/head This commit looks good
2023-04-28 17:06:31 +02:00
9c5ade930c Change server
All checks were successful
Subsonics - Pipeline/pipeline/head This commit looks good
2023-04-28 11:21:15 +02:00
a4a34e83ec Change server
All checks were successful
Subsonics - Pipeline/pipeline/head This commit looks good
2023-04-28 10:38:44 +02:00
59b5c07da6 Change server
All checks were successful
Subsonics - Pipeline/pipeline/head This commit looks good
2023-04-28 00:33:20 +02:00
8add3c13b7 First Implements Progression Bar
All checks were successful
Subsonics - Pipeline/pipeline/head This commit looks good
2023-04-27 23:45:36 +02:00
6aec5ec3b6 Add Error Discord Auth Failed #3
All checks were successful
Subsonics - Pipeline/pipeline/head This commit looks good
2023-04-27 12:00:14 +02:00
ea26cb9514 Add Error Discord Auth Failed #2
All checks were successful
Subsonics - Pipeline/pipeline/head This commit looks good
2023-04-27 11:58:04 +02:00
d136ae9c50 Add Error Discord Auth Failed
All checks were successful
Subsonics - Pipeline/pipeline/head This commit looks good
2023-04-27 11:55:28 +02:00
354a475954 Fix Discord Request Implements Final 2
All checks were successful
Subsonics - Pipeline/pipeline/head This commit looks good
2023-04-27 11:52:49 +02:00
ad084e3555 Fix Discord Request Implements Final
All checks were successful
Subsonics - Pipeline/pipeline/head This commit looks good
2023-04-27 11:49:39 +02:00
1be1f65453 Fix Discord Request Implements #3
All checks were successful
Subsonics - Pipeline/pipeline/head This commit looks good
2023-04-27 11:48:17 +02:00
e9c35e11bd Fix Discord Request Implements #2
All checks were successful
Subsonics - Pipeline/pipeline/head This commit looks good
2023-04-27 11:44:47 +02:00
0c791c2b45 Log on Request Implements #2
All checks were successful
Subsonics - Pipeline/pipeline/head This commit looks good
2023-04-27 11:43:20 +02:00
99734aa619 Log on Request Implements
All checks were successful
Subsonics - Pipeline/pipeline/head This commit looks good
2023-04-27 11:41:40 +02:00
b755e989cd Test Stable Version
All checks were successful
Subsonics - Pipeline/pipeline/head This commit looks good
2023-04-27 11:22:02 +02:00
3aa775d81b Add Server Implements for Submanager
All checks were successful
Subsonics - Pipeline/pipeline/head This commit looks good
2023-04-26 23:50:58 +02:00
d801f02978 Change git repository
All checks were successful
Subsonics - Pipeline/pipeline/head This commit looks good
2023-04-24 15:24:12 +02:00
87787abff7 Add loop, shuffle, auto leave
All checks were successful
Subsonics - Pipeline/pipeline/head This commit looks good
2023-04-23 17:46:50 +02:00
c4fbc3338a Fix Restart #7
All checks were successful
Subsonics - Pipeline/pipeline/head This commit looks good
2023-04-22 17:16:24 +02:00
67af38c9f4 Fix Restart #6
All checks were successful
Subsonics - Pipeline/pipeline/head This commit looks good
2023-04-22 17:10:01 +02:00
7fbba2fdb9 Fix Restart #5
All checks were successful
Subsonics - Pipeline/pipeline/head This commit looks good
2023-04-22 17:05:05 +02:00
a43fd09e9b Fix Restart #5
All checks were successful
Subsonics - Pipeline/pipeline/head This commit looks good
2023-04-22 17:03:16 +02:00
244ecae5b7 Fix /restart #4
All checks were successful
Subsonics - Pipeline/pipeline/head This commit looks good
2023-04-22 17:00:36 +02:00
ecdcb3c11c Fix /restart #3
All checks were successful
Subsonics - Pipeline/pipeline/head This commit looks good
2023-04-22 16:56:21 +02:00
d99783dec5 Fix /restart #2
All checks were successful
Subsonics - Pipeline/pipeline/head This commit looks good
2023-04-22 16:54:59 +02:00
ec561101cc Fix /restart
All checks were successful
Subsonics - Pipeline/pipeline/head This commit looks good
2023-04-22 16:52:19 +02:00
811937a4ab Fix Pipeline Support #4
All checks were successful
Subsonics - Pipeline/pipeline/head This commit looks good
2023-04-22 16:41:30 +02:00
5e8656fbc8 Fix Pipeline Support #3
Some checks failed
Subsonics - Pipeline/pipeline/head There was a failure building this commit
2023-04-22 16:35:56 +02:00
39068afce4 Fix Pipeline Support #2
Some checks failed
Subsonics - Pipeline/pipeline/head There was a failure building this commit
2023-04-22 16:34:55 +02:00
3091ecf074 Fix Pipeline Support
Some checks failed
Subsonics - Pipeline/pipeline/head There was a failure building this commit
2023-04-22 16:34:01 +02:00
d8c11761cd Add Pipeline Support
Some checks failed
Subsonics - Pipeline/pipeline/head There was a failure building this commit
2023-04-22 16:29:35 +02:00
31ba11951b 4.0 2023-04-11 22:26:27 +02:00
2a62ebc2f6 3.0 2023-04-10 21:37:47 +02:00
ffeef2df90 Version 2 2023-04-10 17:41:59 +02:00
33 changed files with 4741 additions and 150 deletions

4
.gitignore vendored
View File

@ -20,6 +20,9 @@ coverage
# nyc test coverage
.nyc_output
tokens.json
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt
@ -36,6 +39,7 @@ build/Release
node_modules/
jspm_packages/
# Typescript v1 declaration files
typings/

33
Jenkinsfile vendored Normal file
View File

@ -0,0 +1,33 @@
pipeline {
agent any
stages {
stage('[Subsonics] - Test') {
steps {
script {
echo "[Subsonics-Deploy] - Test Stage"
sh "rm -rf bot"
sh "git clone https://git.raphix.fr/subsonics/bot.git"
sh "cd bot"
sh "npm i"
sh "ENV='TEST' node src/main.js"
}
}
}
stage('[Subsonics] - Déploiement') {
steps {
script {
echo "[Subsonics-Deploy] - Deploy Stage"
sh "ssh raphix@raphix.fr sudo apt update -y"
sh "ssh raphix@raphix.fr sudo apt upgrade -y"
sh "ssh raphix@raphix.fr sudo -S -u gitlab-ci /home/gitlab-ci/subsonics_deploy.sh"
}
}
}
}
}

1532
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,13 +1,27 @@
{
"name": "subsonics-discord",
"author": "Raphix",
"version": "1.0.0",
"version": "7.5",
"nodemonConfig": {
"ext": "js, html",
"ignore": [
"*.json",
"*.html"
],
"delay": "2"
},
"dependencies": {
"cookie-parser": "^1.4.6",
"discord.js": "^14.9.0",
"erela.js": "^2.4.0",
"nodemon": "^2.0.22"
"express": "^4.18.2",
"nodemon": "^2.0.22",
"socket.io": "^4.6.1",
"uuid": "^9.0.0",
"ytfps": "^1.1.0"
},
"scripts": {
"start": "nodemon src/main.js"
"start": "nodemon src/main.js",
"dev": "set DEV=true& nodemon src/main.js"
}
}

155
src/close/close.css Normal file
View File

@ -0,0 +1,155 @@
@import url('https://fonts.googleapis.com/css2?family=Open+Sans&display=swap');
body {
background-color: #171717 !important;
font-family: 'Open Sans', sans-serif !important;
padding: 3%;
}
.top-title {
display: flex;
width: 100%;
flex-direction: row;
justify-content: center;
align-items: center;
color: white;
}
.top-logo {
width: 5vw;
border-radius: 10%;
}
.buttonClose {
background-color: transparent;
border: none;
border-radius: 15px;
cursor: pointer;
transition: all 0.3s ease 0s;
font-family: 'noto Sans', sans-serif;
font-weight: 500;
font-size: 15px;
color: white;
text-decoration: none;
-webkit-app-region: no-drag;
margin: 5px;
outline: none;
}
.text {
text-align: center;
font-size: 2vw;
color: white;
}
.boxtext {
margin-top: 5%;
border-radius: 15px;
background-color: #3d3d3d;
width: 50%;
padding: 3%;
margin-right: auto;
margin-left: auto;
}
.buttonClose:hover {
color: red;
}
.buttonClose:active {
color: rgb(255, 255, 255);
}
.buttonReduce {
background-color: transparent;
border: none;
border-radius: 15px;
cursor: pointer;
transition: all 0.3s ease 0s;
font-family: 'noto Sans', sans-serif;
font-weight: 500;
font-size: 13px;
color: white;
text-decoration: none;
-webkit-app-region: no-drag;
margin: 5px;
outline: none;
}
.buttonReduce:hover {
color: rgb(46, 196, 255);
}
.buttonReduce:active {
color: rgb(255, 255, 255);
}
header {
display: flex;
}
.content {
padding: 5%;
padding-top: 0;
}
.buttonFav {
background-color: transparent;
border: none;
border-radius: 15px;
cursor: pointer;
transition: all 0.3s ease 0s;
font-family: 'noto Sans', sans-serif;
font-weight: 500;
font-size: 13px;
color: white;
text-decoration: none;
-webkit-app-region: no-drag;
margin: 0;
outline: none;
}
.buttonFav:hover {
color: rgb(242, 255, 53);
}
.buttonFav:active {
color: rgb(255, 255, 255);
}
.title-t {
width: +30%;
margin-left: 1%;
margin-top: 1%;
}

21
src/close/close.html Normal file
View File

@ -0,0 +1,21 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="./close.css">
<title>Subsonics - Submanager</title>
</head>
<body>
<div class="top-title">
<img class="top-logo" src="./logo.png" alt="Logo">
<img class="title-t" src="./title.png" alt="Logo">
</div>
<div class="boxtext">
<p class="text">Vous pouvez fermer cette fenêtre !</p>
<p class="text">En cas de problème, prévenez Raphix#8434 !</p>
</div>
</body>
</html>

BIN
src/close/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.0 KiB

BIN
src/close/title.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

95
src/commands/back.js Normal file
View File

@ -0,0 +1,95 @@
const { SlashCommandBuilder, EmbedBuilder } = require("discord.js");
const log = require("../sublog")
module.exports = {
data: new SlashCommandBuilder()
.setName("back")
.setDescription("Permet de revenir à la musique précédente !"),
async execute(client, interaction) {
if(client.dictator == true ) {
if((interaction.member._roles.includes("397725956598530050") == true | interaction.member.user.id == "486943594893017119")) {
makeAction()
} else {
const embed = new EmbedBuilder()
.setColor(0xff0303)
.setTitle('Mode Dictateur')
.setTimestamp();
const song_show = {name: "Le mode dictateur est actif !", value: "Demande au grand roi !"}
embed.addFields(song_show)
interaction.reply({embeds: [embed]})
}
} else {
makeAction();
}
async function makeAction() {
let embed = new EmbedBuilder()
.setColor(0xe033ff)
.setTitle('Liste de lecture')
.setDescription("Les musiques vont défiler dans cet ordre !")
.setTimestamp();
let player = client.manager.players.get(interaction.guild.id)
if(!player) {
embed = new EmbedBuilder()
.setColor(0xff0303)
.setTitle('Erreur : Back')
.setTimestamp();
const song_show = {name: "Aucune chanson n'a été joué précédemment !", value: "Changement impossible !"}
embed.addFields(song_show)
interaction.reply({embeds: [embed]})
} else {
let queue = client.manager.players.get(interaction.guild.id).queue;
if(queue.previous == null){
embed = new EmbedBuilder()
.setColor(0xff0303)
.setTitle('Erreur : Back')
.setTimestamp();
const song_show = {name: "Aucune chanson n'a été joué précédemment !", value: "Changement impossible !"}
embed.addFields(song_show)
interaction.reply({embeds: [embed]})
} else {
embed = new EmbedBuilder()
.setColor(0x03ff2d)
.setTitle('Retour vers le passé !!!')
.setDescription("**Ok, On est reparti avec "+ player.queue.previous.title +" et c'est demandée par " + interaction.member.user.username + "**")
.setTimestamp();
player.stop()
player.play(queue.previous)
interaction.reply({embeds: [embed]})
}
}
process.emit("discordDoing")
}
}
}

59
src/commands/dictator.js Normal file
View File

@ -0,0 +1,59 @@
const { SlashCommandBuilder, EmbedBuilder } = require("discord.js");
const log = require("../sublog")
module.exports = {
data: new SlashCommandBuilder()
.setName("dictator")
.setDescription("Active ou désactive le mode dictateur !"),
async execute(client, interaction) {
if(interaction.member._roles.includes("397725956598530050") == true | interaction.member.user.id == "486943594893017119") {
if(client.dictator == true) {
client.dictator = false;
const embed = new EmbedBuilder()
.setColor(0x3b3b3b)
.setTitle('Mode Dictateur Inactif !')
.setDescription("Le pouvoir du peuple est restauré !")
.setTimestamp();
interaction.reply({embeds: [embed]})
} else {
const embed = new EmbedBuilder()
.setColor(0xfff200)
.setTitle('Mode Dictateur Actif!')
.setDescription("Notre bon roi a désormais le seul droit sur la musique !")
.setTimestamp();
interaction.reply({embeds: [embed]})
client.dictator = true;
}
} else {
const embed = new EmbedBuilder()
.setColor(0xff0303)
.setTitle('Erreur : Mode Dictateur')
.setTimestamp();
const song_show = {name: "Tu n'as pas la permission de faire cela !", value: "Verbotten !"}
embed.addFields(song_show)
interaction.reply({embeds: [embed]})
}
process.emit("discordDoing")
}
}

37
src/commands/help.js Normal file
View File

@ -0,0 +1,37 @@
const { SlashCommandBuilder, EmbedBuilder } = require("discord.js");
const log = require("../sublog")
module.exports = {
data:new SlashCommandBuilder()
.setName("help")
.setDescription("Faire partir le meilleur groupe du monde !"),
async execute(client, interaction) {
const embed = new EmbedBuilder()
.setColor(0x03ff2d)
.setTitle('Comment assister au concert ?')
.setDescription("**Eh ! Tu as eu ton ticket ? Tant mieux ! Voici la liste des commandes à utiliser dans le salon <#664355637685256203>**")
.addFields({name: "/play <nom>", value: "Cette commande te permet de lire depuis Youtube, n'importe quel musique !"},
{name: "/leave", value: "Si tu ne veux plus du meilleur groupe du monde (faire partir le bot), cette commande les fera partir aussi vite qu'ils sont arrivés !"},
{name: "/pause", value: "Besoin d'un entracte ? Cette commande te permettera de mettre le morceau en cours, en pause !"},
{name: "/resume", value: "Fin de l'entracte ? Cette commande te permettera de mettre le morceau qui était en pause, en cours !"},
{name: "/queue <afficher/supprimer>", value: "Permet d'afficher ou de supprimer les titres de la liste de lecture."},
{name: "/state", value: "Donne l'état de la musique"},
{name: "/skip", value: "Passer à la chanson suivante."},
{name: "/back", value: "Revenir à la chanson précédente."},
{name: "/playlist", value: "Permet d'ajouter à la liste de lecture toute une playlist."})
.setTimestamp()
.setThumbnail("https://static.wikia.nocookie.net/codelyoko/images/9/95/Subdigitals.jpg/revision/latest/scale-to-width-down/180?cb=20120105180510&path-prefix=fr");
interaction.reply({embeds: [embed]})
}
}

View File

@ -1,4 +1,6 @@
const { SlashCommandBuilder, EmbedBuilder } = require("discord.js");
const { Player } = require("erela.js");
const log = require("../sublog")
module.exports = {
@ -8,13 +10,38 @@ module.exports = {
async execute(client, interaction) {
if(client.dictator == true ) {
if((interaction.member._roles.includes("397725956598530050") == true | interaction.member.user.id == "486943594893017119")) {
makeAction()
} else {
const embed = new EmbedBuilder()
.setColor(0xff0303)
.setTitle('Mode Dictateur')
.setTimestamp();
const song_show = {name: "Le mode dictateur est actif !", value: "Demande au grand roi !"}
embed.addFields(song_show)
interaction.reply({embeds: [embed]})
}
} else {
makeAction();
}
async function makeAction() {
if(!interaction.member.voice.channel) return interaction.reply({content:"Vous devez rejoindre un salon vocal !", ephemeral: true})
let player = client.manager.players.get(interaction.guild.id)
if(player) {
player.disconnect()
player.destroy()
const embed = new EmbedBuilder()
.setColor(0xff0000)
@ -28,9 +55,11 @@ module.exports = {
} else {
interaction.reply("**Aucune musique n'est actuellement joué !**")
interaction.reply("**Aucune musique n'est actuellement jouée !**")
}
process.emit("discordDoing")
}
}

86
src/commands/loop.js Normal file
View File

@ -0,0 +1,86 @@
const { SlashCommandBuilder, EmbedBuilder } = require("discord.js");
const log = require("../sublog")
module.exports = {
data: new SlashCommandBuilder()
.setName("loop")
.setDescription("Active ou désactive la répétition de la liste de lecture !"),
async execute(client, interaction) {
if(client.dictator == true ) {
if((interaction.member._roles.includes("397725956598530050") == true | interaction.member.user.id == "486943594893017119")) {
makeAction()
} else {
const embed = new EmbedBuilder()
.setColor(0xff0303)
.setTitle('Mode Dictateur')
.setTimestamp();
const song_show = {name: "Le mode dictateur est actif !", value: "Demande au grand roi !"}
embed.addFields(song_show)
interaction.reply({embeds: [embed]})
}
} else {
makeAction();
}
async function makeAction() {
if(!interaction.member.voice.channel) return interaction.reply({content:"Vous devez rejoindre un salon vocal !", ephemeral: true})
let player = client.manager.players.get(interaction.guild.id)
if(player) {
if(player.queueRepeat == false) {
const embed = new EmbedBuilder()
.setColor(0xfff200)
.setTitle('Loop Actif!')
.setDescription("On recommence !")
.setTimestamp();
interaction.reply({embeds: [embed]})
player.setQueueRepeat(true)
} else {
const embed = new EmbedBuilder()
.setColor(0x3b3b3b)
.setTitle('Loop inactif!')
.setDescription("Ca suffit ! Terminez votre concert !")
.setTimestamp();
interaction.reply({embeds: [embed]})
player.setQueueRepeat(false)
}
} else {
interaction.reply("**Aucune musique n'est actuellement jouée !**")
}
process.emit("discordDoing")
}
}
}

View File

@ -1,13 +1,41 @@
const { SlashCommandBuilder, EmbedBuilder } = require("discord.js");
const log = require("../sublog")
module.exports = {
data: new SlashCommandBuilder()
.setName("pause")
.setDescription("Met en pause la musique joué !"),
.setDescription("Met en pause la musique jouée !"),
async execute(client, interaction) {
if(client.dictator == true ) {
if((interaction.member._roles.includes("397725956598530050") == true | interaction.member.user.id == "486943594893017119")) {
makeAction()
} else {
const embed = new EmbedBuilder()
.setColor(0xff0303)
.setTitle('Mode Dictateur')
.setTimestamp();
const song_show = {name: "Le mode dictateur est actif !", value: "Demande au grand roi !"}
embed.addFields(song_show)
interaction.reply({embeds: [embed]})
}
} else {
makeAction();
}
async function makeAction() {
if(!interaction.member.voice.channel) return interaction.reply({content:"Vous devez rejoindre un salon vocal !", ephemeral: true})
let player = client.manager.players.get(interaction.guild.id)
@ -19,7 +47,7 @@ module.exports = {
const embed = new EmbedBuilder()
.setColor(0x03ff2d)
.setTitle('Pause !')
.setDescription("**Ok, une entracte est demandé par " + interaction.member.user.username + "**")
.setDescription("**Ok, une entracte est demandée par " + interaction.member.user.username + "**")
.setTimestamp();
@ -27,14 +55,17 @@ module.exports = {
player.pause(true)
} else {
interaction.reply("**Aucune musique n'est actuellement joué !**")
interaction.reply("**Aucune musique n'est actuellement jouée !**")
}
} else {
interaction.reply("**Aucune musique n'est actuellement joué !**")
interaction.reply("**Aucune musique n'est actuellement jouée !**")
}
process.emit("discordDoing")
}
}
}

View File

@ -1,4 +1,5 @@
const { SlashCommandBuilder, EmbedBuilder } = require("discord.js");
const log = require("../sublog")
module.exports = {
@ -8,7 +9,7 @@ module.exports = {
async execute(client, interaction) {
process.emit("discordDoing")
const embed = new EmbedBuilder()
.setColor(0xb0f542)
.setTitle('Résultat du ping')

View File

@ -1,47 +1,114 @@
const { EmbedBuilder } = require("@discordjs/builders");
const { SlashCommandBuilder, Embed } = require("discord.js");
const log = require("../sublog")
module.exports = {
data:new SlashCommandBuilder()
.setName("play")
.setDescription("Lire une musique depuis youtube")
.addStringOption(option => option.setName("nom").setDescription("Le nom de la musique recherché !").setRequired(true)),
.addStringOption(option => option.setName("nom_ou_lien").setDescription("Le nom de la musique recherchée !").setRequired(true)),
async execute(client, interaction) {
const song_name = interaction.options.getString("nom")
if(client.dictator == true ) {
if((interaction.member._roles.includes("397725956598530050") == true | interaction.member.user.id == "486943594893017119")) {
makeAction()
} else {
const embed = new EmbedBuilder()
.setColor(0xff0303)
.setTitle('Mode Dictateur')
.setTimestamp();
const song_show = {name: "Le mode dictateur est actif !", value: "Demande au grand roi !"}
embed.addFields(song_show)
interaction.reply({embeds: [embed]})
}
} else {
makeAction();
}
async function makeAction() {
const song_name = interaction.options.getString("nom_ou_lien")
if(!interaction.member.voice.channel) return interaction.reply({content:"Vous devez rejoindre un salon vocal !", ephemeral: true})
let player = client.manager.players.get(interaction.guild.id)
if(!player) player = client.manager.create({
if(!player) {
player = client.manager.create({
guild: interaction.guild.id,
voiceChannel: interaction.member.voice.channel.id,
textChannel: interaction.channel.id,
});
player.connect();
}
const songs = await client.manager.search(song_name)
player.connect();
if(!player.playing) {
player.queue.add(songs.tracks[0])
client.manager.players.get(interaction.guild.id).queue.add(songs.tracks[0])
player.play()
if(!player.playing) player.play()
console.log(songs.tracks[0])
const embed = new EmbedBuilder()
const embed = await new EmbedBuilder()
.setColor(0x15e6ed)
.setTitle('**Lecture de **' + songs.tracks[0].title)
.setTitle('**Lecture de : **' + songs.tracks[0].title)
.setDescription('**Demandé par **' + interaction.member.user.username)
.addFields({name: "Auteur", value: songs.tracks[0].author},
{name: "URL", value:songs.tracks[0].uri})
.setThumbnail(songs.tracks[0].thumbnail)
.setTimestamp();
try {
interaction.reply({embeds: [embed]})
} catch(error) {
log.bot.error("Error processing /play")
log.bot.error(error);
}
} else {
const embed = await new EmbedBuilder()
.setColor(0x15e6ed)
.setTitle('**Ajout dans la liste de lecture **: ' + songs.tracks[0].title)
.setDescription('**Demandé par **' + interaction.member.user.username)
.addFields({name: "Auteur", value: songs.tracks[0].author},
{name: "URL", value:songs.tracks[0].uri})
.setThumbnail(songs.tracks[0].thumbnail)
.setTimestamp();
client.manager.players.get(interaction.guild.id).queue.add(songs.tracks[0])
try {
interaction.reply({embeds: [embed]})
} catch(error) {
log.bot.error("Error processing /play")
log.bot.error(error);
}
}
process.emit("discordDoing")
}
}
}

147
src/commands/playlist.js Normal file
View File

@ -0,0 +1,147 @@
const { EmbedBuilder } = require("@discordjs/builders");
const { SlashCommandBuilder, Embed } = require("discord.js");
const log = require("../sublog")
module.exports = {
data:new SlashCommandBuilder()
.setName("playlist")
.setDescription("Permet de lire une playlist de Youtube !")
.addStringOption(option => option.setName("lien").setDescription("Le lien de la playlist !").setRequired(true)),
async execute(client, interaction) {
if(client.dictator == true ) {
if((interaction.member._roles.includes("397725956598530050") == true | interaction.member.user.id == "486943594893017119")) {
makeAction()
} else {
const embed = new EmbedBuilder()
.setColor(0xff0303)
.setTitle('Mode Dictateur')
.setTimestamp();
const song_show = {name: "Le mode dictateur est actif !", value: "Demande au grand roi !"}
embed.addFields(song_show)
interaction.reply({embeds: [embed]})
}
} else {
makeAction();
}
async function makeAction() {
process.emit("discordDoing")
const song_name = interaction.options.getString("lien")
if(!interaction.member.voice.channel) return interaction.reply({content:"Vous devez rejoindre un salon vocal !", ephemeral: true})
let player = client.manager.players.get(interaction.guild.id)
if(!player) {
player = client.manager.create({
guild: interaction.guild.id,
voiceChannel: interaction.member.voice.channel.id,
textChannel: interaction.channel.id,
});
player.connect();
}
var ytfps = require("ytfps")
try {
var playlist = await ytfps(song_name)
var author = "Artiste inconnu !"
if(typeof playlist.author != "undefined" ) {
author == playlist.author.name
}
const embed = await new EmbedBuilder()
.setColor(0x15e6ed)
.setTitle('**Lecture de la playlist : **' + playlist.title)
.setDescription('**Demandé par **' + interaction.member.user.username)
.addFields({name: "Auteur", value: author},
{name: "URL", value:playlist.url},
{name: "Nombre de videos", value:playlist.video_count + " vidéos"})
.setThumbnail(playlist.thumbnail_url)
.setTimestamp();
try {
await interaction.reply({embeds: [embed]})
} catch(error) {
log.bot.error(error);
}
addList(playlist, player)
async function addList(Pplaylist, Pplayer) {
for(var song of Pplaylist.videos) {
const song_finded = await client.manager.search(song.url)
await client.manager.players.get(interaction.guild.id).queue.add(song_finded.tracks[0])
}
if(Pplayer.playing == false) {
await Pplayer.play()
}
}
await process.emit("discordDoing")
} catch(error) {
const embed = new EmbedBuilder()
.setColor(0xff0303)
.setTitle('Erreur : Playlist !')
.setTimestamp();
const song_show = {name: "Une erreur s'est produite ou la playlist n'existe pas !", value: "Est-tu sur du lien ?"}
embed.addFields(song_show)
interaction.reply({embeds: [embed]})
log.bot.error(error);
};
process.emit("discordDoing")
}
}
}

187
src/commands/queue.js Normal file
View File

@ -0,0 +1,187 @@
const { SlashCommandBuilder, EmbedBuilder } = require("discord.js");
const log = require("../sublog")
module.exports = {
data: new SlashCommandBuilder()
.setName("queue")
.setDescription("Affiche le ping du bot !")
.addStringOption(option => option.setName("action").setDescription("Que veux tu faire avec la queue ?").setRequired(true).addChoices(
{name: "Afficher", value: "show"},
{name: "Supprimer", value: "delete"}
)).addIntegerOption(option => option.setName("number").setDescription("Numéro de la place dans la liste de lecture")),
async execute(client, interaction) {
if(client.dictator == true ) {
if((interaction.member._roles.includes("397725956598530050") == true | interaction.member.user.id == "486943594893017119")) {
makeAction()
} else {
const embed = new EmbedBuilder()
.setColor(0xff0303)
.setTitle('Mode Dictateur')
.setTimestamp();
const song_show = {name: "Le mode dictateur est actif !", value: "Demande au grand roi !"}
embed.addFields(song_show)
interaction.reply({embeds: [embed]})
}
} else {
makeAction();
}
async function makeAction() {
if(!interaction.member.voice.channel) return interaction.reply({content:"Vous devez rejoindre un salon vocal !", ephemeral: true})
const choice = interaction.options.getString("action")
if(choice == "show") {
const embed = new EmbedBuilder()
.setColor(0xe033ff)
.setTitle('Liste de lecture')
.setDescription("Les musiques vont défiler dans cet ordre !")
.setTimestamp();
let player = client.manager.players.get(interaction.guild.id)
if(!player) {
const song_show = {name: "Aucune chanson n'est dans la queue", value: "Tu peux en ajouter avec /play"}
embed.addFields(song_show)
interaction.reply({embeds: [embed]})
} else {
let queue = client.manager.players.get(interaction.guild.id).queue;
if(queue.length == 0){
const song_show = {name: "Aucune chanson n'est dans la queue", value: "Tu peux en ajouter avec /play"}
embed.addFields(song_show)
interaction.reply({embeds: [embed]})
} else {
var fieldmax = 0
for(var song of queue) {
fieldmax += 1
if(fieldmax <= 25) {
const song_show = {name: queue.indexOf(song) + " - " + song.title, value: song.author}
embed.addFields(song_show)
}
}
await interaction.reply({embeds: [embed]})
}
}
} else if(choice == "delete") {
let embed = new EmbedBuilder()
.setColor(0xe033ff)
.setTitle('Liste de lecture')
.setDescription("Les musiques vont défiler dans cet ordre !")
.setTimestamp();
let player = client.manager.players.get(interaction.guild.id)
if(!player) {
embed = new EmbedBuilder()
.setColor(0xff0303)
.setTitle('Erreur : Liste de lecture')
.setTimestamp();
const song_show = {name: "Aucune chanson n'est dans la queue", value: "Supression impossible"}
embed.addFields(song_show)
interaction.reply({embeds: [embed]})
} else {
let queue = client.manager.players.get(interaction.guild.id).queue;
if(queue.length == 0){
embed = new EmbedBuilder()
.setColor(0xff0303)
.setTitle('Erreur : Liste de lecture')
.setTimestamp();
const song_show = {name: "Aucune chanson n'est dans la queue", value: "Supression impossible"}
embed.addFields(song_show)
interaction.reply({embeds: [embed]})
} else {
const number = interaction.options.getInteger("number")
if(number != null) {
try {
queue.splice(number, 1)
embed = new EmbedBuilder()
.setColor(0xe033ff)
.setTitle('Supression : Liste de lecture')
.setDescription("La musique a été retiré de la liste de lecture !")
.setTimestamp();
interaction.reply({embeds: [embed]})
} catch(error) {
embed = new EmbedBuilder()
.setColor(0xff0303)
.setTitle('Erreur : Liste de lecture')
.setTimestamp();
const song_show = {name: "Le numéro correspondant n'est pas disponible", value: "Supression impossible"}
embed.addFields(song_show)
interaction.reply({embeds: [embed]})
}
} else {
embed = new EmbedBuilder()
.setColor(0xff0303)
.setTitle('Erreur : Liste de lecture')
.setTimestamp();
const song_show = {name: "Un numéro est nécéssaire", value: "Supression impossible"}
embed.addFields(song_show)
interaction.reply({embeds: [embed]})
}
}
}
} else {
await interaction.reply("**La commande a été mal éxécutée !**")
}
process.emit("discordDoing")
}
}
}

64
src/commands/restart.js Normal file
View File

@ -0,0 +1,64 @@
const { SlashCommandBuilder, EmbedBuilder } = require("discord.js");
const log = require("../sublog")
const { Manager } = require("erela.js")
module.exports = {
data: new SlashCommandBuilder()
.setName("restart")
.setDescription("Redémarre le bot !"),
async execute(client, interaction) {
if(interaction.member._roles.includes("397725956598530050") == true | interaction.member._roles.includes("397724656548970508") == true| interaction.member._roles.includes("397725128198455299") == true| interaction.member._roles.includes("397725552968204288") == true | interaction.member.user.id == "486943594893017119") {
const embed = new EmbedBuilder()
.setColor(0xffffff)
.setTitle('Redémarrage du bot !')
.setDescription("Vérifie le redémarrage avec /play et si cela ne fonctionne pas, SPAM <@486943594893017119> !!!")
.setTimestamp();
interaction.reply({embeds: [embed]})
let player = client.manager.players.get(interaction.guild.id)
if(player) {
player.destroy()
}
const nodes = [
{
host: "narco.buses.rocks",
password: "glasshost1984",
port: 2269,
secure: false
}
];
client.manager.createNode(nodes)
} else {
const embed = new EmbedBuilder()
.setColor(0xff0303)
.setTitle('Erreur : Redémarrage du BOT')
.setTimestamp();
const song_show = {name: "Tu n'as pas la permission de faire cela !", value: "Verbotten !"}
embed.addFields(song_show)
interaction.reply({embeds: [embed]})
}
process.emit("discordDoing")
}
}

View File

@ -1,13 +1,40 @@
const { SlashCommandBuilder, EmbedBuilder } = require("discord.js");
const log = require("../sublog")
module.exports = {
data: new SlashCommandBuilder()
.setName("resume")
.setDescription("Met en pause la musique joué !"),
.setDescription("Remet la musique qui était en pause !"),
async execute(client, interaction) {
if(client.dictator == true ) {
if((interaction.member._roles.includes("397725956598530050") == true | interaction.member.user.id == "486943594893017119")) {
makeAction()
} else {
const embed = new EmbedBuilder()
.setColor(0xff0303)
.setTitle('Mode Dictateur')
.setTimestamp();
const song_show = {name: "Le mode dictateur est actif !", value: "Demande au grand roi !"}
embed.addFields(song_show)
interaction.reply({embeds: [embed]})
}
} else {
makeAction();
}
async function makeAction() {
if(!interaction.member.voice.channel) return interaction.reply({content:"Vous devez rejoindre un salon vocal !", ephemeral: true})
let player = client.manager.players.get(interaction.guild.id)
@ -19,22 +46,25 @@ module.exports = {
const embed = new EmbedBuilder()
.setColor(0x03ff2d)
.setTitle('C\'est reparti !')
.setDescription("**Ok, Fin de l'entracte, c'est reparti et c'est demandé par " + interaction.member.user.username + "**")
.setDescription("**Ok, Fin de l'entracte, c'est reparti et c'est demandée par " + interaction.member.user.username + "**")
.setTimestamp();
interaction.reply({embeds: [embed]})
player.pause(false)
} else {
interaction.reply("**Aucune musique n'est actuellement joué !**")
interaction.reply("**Aucune musique n'est actuellement jouée !**")
}
} else {
interaction.reply("**Aucune musique n'est actuellement joué !**")
interaction.reply("**Aucune musique n'est actuellement jouée !**")
}
process.emit("discordDoing")
}
}
}

81
src/commands/seek.js Normal file
View File

@ -0,0 +1,81 @@
const { SlashCommandBuilder, EmbedBuilder } = require("discord.js");
const log = require("../sublog")
module.exports = {
data: new SlashCommandBuilder()
.setName("seek")
.setDescription("Définie la position du player dans la musique !")
.addIntegerOption(option => option.setName("duration").setDescription("En seconde")),
async execute(client, interaction) {
if(client.dictator == true ) {
if((interaction.member._roles.includes("397725956598530050") == true | interaction.member.user.id == "486943594893017119")) {
makeAction()
} else {
const embed = new EmbedBuilder()
.setColor(0xff0303)
.setTitle('Mode Dictateur')
.setTimestamp();
const song_show = {name: "Le mode dictateur est actif !", value: "Demande au grand roi !"}
embed.addFields(song_show)
interaction.reply({embeds: [embed]})
}
} else {
makeAction();
}
async function makeAction() {
if(!interaction.member.voice.channel) return interaction.reply({content:"Vous devez rejoindre un salon vocal !", ephemeral: true})
let player = client.manager.players.get(interaction.guild.id)
let duration = interaction.options.getInteger("duration")
if(player) {
try {
const embed = new EmbedBuilder()
.setColor(0xfff200)
.setTitle('On avance ou recule ?')
.setTimestamp();
interaction.reply({embeds: [embed]})
duration = duration ** 3
player.seek(duration)
} catch (error) {
log.bot.error(error);
interaction.reply("**Aucune musique n'est actuellement jouée !**")
}
} else {
interaction.reply("**Aucune musique n'est actuellement jouée !**")
}
process.emit("discordDoing")
}
}
}

71
src/commands/shuffle.js Normal file
View File

@ -0,0 +1,71 @@
const { SlashCommandBuilder, EmbedBuilder } = require("discord.js");
const log = require("../sublog")
module.exports = {
data: new SlashCommandBuilder()
.setName("mix")
.setDescription("Mélange la liste de lecture !"),
async execute(client, interaction) {
if(client.dictator == true ) {
if((interaction.member._roles.includes("397725956598530050") == true | interaction.member.user.id == "486943594893017119")) {
makeAction()
} else {
const embed = new EmbedBuilder()
.setColor(0xff0303)
.setTitle('Mode Dictateur')
.setTimestamp();
const song_show = {name: "Le mode dictateur est actif !", value: "Demande au grand roi !"}
embed.addFields(song_show)
interaction.reply({embeds: [embed]})
}
} else {
makeAction();
}
async function makeAction() {
if(!interaction.member.voice.channel) return interaction.reply({content:"Vous devez rejoindre un salon vocal !", ephemeral: true})
let player = client.manager.players.get(interaction.guild.id)
if(player) {
const embed = new EmbedBuilder()
.setColor(0xfff200)
.setTitle('On mélange !')
.setDescription("Toutes les musiques de la liste de lecture ont été mélangés !")
.setTimestamp();
interaction.reply({embeds: [embed]})
player.queue.shuffle()
} else {
interaction.reply("**Aucune musique n'est actuellement jouée !**")
}
process.emit("discordDoing")
}
}
}

90
src/commands/skip.js Normal file
View File

@ -0,0 +1,90 @@
const { SlashCommandBuilder, EmbedBuilder } = require("discord.js");
const log = require("../sublog")
module.exports = {
data: new SlashCommandBuilder()
.setName("skip")
.setDescription("Permet de passer à la musique suivante !"),
async execute(client, interaction) {
if(client.dictator == true ) {
if((interaction.member._roles.includes("397725956598530050") == true | interaction.member.user.id == "486943594893017119")) {
makeAction()
} else {
const embed = new EmbedBuilder()
.setColor(0xff0303)
.setTitle('Mode Dictateur')
.setTimestamp();
const song_show = {name: "Le mode dictateur est actif !", value: "Demande au grand roi !"}
embed.addFields(song_show)
interaction.reply({embeds: [embed]})
}
} else {
makeAction();
}
async function makeAction() {
let embed = new EmbedBuilder()
.setColor(0xe033ff)
.setTitle('Liste de lecture')
.setDescription("Les musiques vont défiler dans cet ordre !")
.setTimestamp();
let player = client.manager.players.get(interaction.guild.id)
if(!player) {
embed = new EmbedBuilder()
.setColor(0xff0303)
.setTitle('Erreur : Skip')
.setTimestamp();
const song_show = {name: "Aucune chanson n'est dans la queue", value: "Changement impossible !"}
embed.addFields(song_show)
interaction.reply({embeds: [embed]})
} else {
let queue = client.manager.players.get(interaction.guild.id).queue;
if(queue.length == 0){
embed = new EmbedBuilder()
.setColor(0xff0303)
.setTitle('Erreur : Skip')
.setTimestamp();
const song_show = {name: "Aucune chanson n'est dans la queue", value: "Changement impossible !"}
embed.addFields(song_show)
interaction.reply({embeds: [embed]})
} else {
player.stop()
embed = new EmbedBuilder()
.setColor(0x03ff2d)
.setTitle('On change de morceau !!!')
.setDescription("**Ok, On est reparti avec "+ player.queue[0].title +" et c'est demandée par " + interaction.member.user.username + "**")
.setTimestamp();
interaction.reply({embeds: [embed]})
}
}
process.emit("discordDoing")
}
}
}

53
src/commands/state.js Normal file
View File

@ -0,0 +1,53 @@
const { SlashCommandBuilder, EmbedBuilder } = require("discord.js");
const log = require("../sublog")
module.exports = {
data: new SlashCommandBuilder()
.setName("state")
.setDescription("Affiche l'état du lecteur !"),
async execute(client, interaction) {
if(!interaction.member.voice.channel) return interaction.reply({content:"Vous devez rejoindre un salon vocal !", ephemeral: true})
let player = client.manager.players.get(interaction.guild.id)
if(player) {
const date = new Date(player.queue.current.duration)
var gMinute = date.getMinutes()
var gSecondes = date.getSeconds()
if(date.getMinutes() <= 9) {
gMinute = "0" + date.getMinutes()
}
if(date.getSeconds() <= 9) {
gSecondes = "0" + date.getSeconds()
}
let embed = new EmbedBuilder()
.setColor(0x32a875)
.setTitle('Information sur la musique !')
.addFields({name:"Titre", value: player.queue.current.title},
{name:"Auteur", value: player.queue.current.author},
{name:"URL", value: player.queue.current.uri},
{name:"Temps", value: gMinute + ":" + gSecondes})
.setTimestamp();
interaction.reply({embeds: [embed]})
} else {
interaction.reply("**Aucune musique n'est actuellement jouée !**")
}
}
}

29
src/commands/version.js Normal file
View File

@ -0,0 +1,29 @@
const { SlashCommandBuilder, EmbedBuilder } = require("discord.js");
const packageJson = require('../../package.json');
const log = require("../sublog")
module.exports = {
data: new SlashCommandBuilder()
.setName("version")
.setDescription("Affiche le ping du bot !"),
async execute(client, interaction) {
process.emit("discordDoing")
const uptime = process.uptime();
const minutes = Math.floor(uptime / 60);
const seconds = Math.floor(uptime % 60);
const embed = new EmbedBuilder()
.setColor(0xb0f542)
.setTitle('Les Subsonics')
.addFields({name: "Version ", value: packageJson.version},{name:"Uptime", value: minutes + " minutes et " + seconds + " secondes"})
.setTimestamp();
interaction.reply({embeds: [embed]})
}
}

View File

@ -1,5 +1,5 @@
{
"token":"MTA5NDcyNzc4OTY4MjM4MDkyMg.G4LcLR.qMZsDn_iR0rrVyie7yXxfmltn3Z_CaQIXMxUiU",
"token":"MTA5NDcyNzc4OTY4MjM4MDkyMg.GXRu96.tkaQ8XqbDgk4blhGk4sme6JGwQkgf9hQ92W15s",
"clientID":"1094727789682380922",
"guildID":"137291455336022018"
}

155
src/error/error.css Normal file
View File

@ -0,0 +1,155 @@
@import url('https://fonts.googleapis.com/css2?family=Open+Sans&display=swap');
body {
background-color: #171717 !important;
font-family: 'Open Sans', sans-serif !important;
padding: 3%;
}
.top-title {
display: flex;
width: 100%;
flex-direction: row;
justify-content: center;
align-items: center;
color: white;
}
.top-logo {
width: 5vw;
border-radius: 10%;
}
.buttonClose {
background-color: transparent;
border: none;
border-radius: 15px;
cursor: pointer;
transition: all 0.3s ease 0s;
font-family: 'noto Sans', sans-serif;
font-weight: 500;
font-size: 15px;
color: white;
text-decoration: none;
-webkit-app-region: no-drag;
margin: 5px;
outline: none;
}
.text {
text-align: center;
font-size: 2vw;
color: rgb(255, 2, 2);
}
.boxtext {
margin-top: 5%;
border-radius: 15px;
background-color: #3d3d3d;
width: 50%;
padding: 3%;
margin-right: auto;
margin-left: auto;
}
.buttonClose:hover {
color: red;
}
.buttonClose:active {
color: rgb(255, 255, 255);
}
.buttonReduce {
background-color: transparent;
border: none;
border-radius: 15px;
cursor: pointer;
transition: all 0.3s ease 0s;
font-family: 'noto Sans', sans-serif;
font-weight: 500;
font-size: 13px;
color: white;
text-decoration: none;
-webkit-app-region: no-drag;
margin: 5px;
outline: none;
}
.buttonReduce:hover {
color: rgb(46, 196, 255);
}
.buttonReduce:active {
color: rgb(255, 255, 255);
}
header {
display: flex;
}
.content {
padding: 5%;
padding-top: 0;
}
.buttonFav {
background-color: transparent;
border: none;
border-radius: 15px;
cursor: pointer;
transition: all 0.3s ease 0s;
font-family: 'noto Sans', sans-serif;
font-weight: 500;
font-size: 13px;
color: white;
text-decoration: none;
-webkit-app-region: no-drag;
margin: 0;
outline: none;
}
.buttonFav:hover {
color: rgb(242, 255, 53);
}
.buttonFav:active {
color: rgb(255, 255, 255);
}
.title-t {
width: +30%;
margin-left: 1%;
margin-top: 1%;
}

21
src/error/error.html Normal file
View File

@ -0,0 +1,21 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="./error.css">
<title>Subsonics - Submanager</title>
</head>
<body>
<div class="top-title">
<img class="top-logo" src="./logo.png" alt="Logo">
<img class="title-t" src="./title.png" alt="Logo">
</div>
<div class="boxtext">
<p class="text">Echec de connexion par Discord !</p>
<p class="text">Vous pouvez fermer cette fenêtre et réessayer !</p>
</div>
</body>
</html>

BIN
src/error/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.0 KiB

BIN
src/error/title.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

File diff suppressed because it is too large Load Diff

152
src/sublog.js Normal file
View File

@ -0,0 +1,152 @@
module.exports.server = (message) => {
var date = new Date()
// [Date Format] - Format de la date
var gmonth = date.getMonth()
var gday = date.getDate()
var gHour = date.getHours()
var gMinute = date.getMinutes()
var gSecondes = date.getSeconds()
if(date.getMonth() + 1 <= 9) {
gmonth = "0" + (date.getMonth() + 1)
}
if(date.getDate() + 1 <= 9) {
gday = "0" + date.getDate()
}
if(date.getHours() + 1 <= 9) {
gHour = "0" + date.getHours()
}
if(date.getMinutes() + 1 <= 9) {
gMinute = "0" + date.getMinutes()
}
if(date.getSeconds() + 1 <= 9) {
gSecondes = "0" + date.getSeconds()
}
var currentDate = date.getFullYear() + "-" + gmonth + "-" + gday + "-" + gHour + "h" + "-" + gMinute + "m" + "-" + gSecondes + "s"
console.log("[Subsonics-Server] - " + currentDate + " - " + message)
}
module.exports.server.error = (message) => {
var date = new Date()
// [Date Format] - Format de la date
var gmonth = date.getMonth()
var gday = date.getDate()
var gHour = date.getHours()
var gMinute = date.getMinutes()
var gSecondes = date.getSeconds()
if(date.getMonth() + 1 <= 9) {
gmonth = "0" + (date.getMonth() + 1)
}
if(date.getDate() + 1 <= 9) {
gday = "0" + date.getDate()
}
if(date.getHours() + 1 <= 9) {
gHour = "0" + date.getHours()
}
if(date.getMinutes() + 1 <= 9) {
gMinute = "0" + date.getMinutes()
}
if(date.getSeconds() + 1 <= 9) {
gSecondes = "0" + date.getSeconds()
}
var currentDate = date.getFullYear() + "-" + gmonth + "-" + gday + "-" + gHour + "h" + "-" + gMinute + "m" + "-" + gSecondes + "s"
console.error("[Subsonics-Server] - [ERROR] - " + currentDate + " - " + message)
}
module.exports.bot = (message) => {
var date = new Date()
// [Date Format] - Format de la date
var gmonth = date.getMonth()
var gday = date.getDate()
var gHour = date.getHours()
var gMinute = date.getMinutes()
var gSecondes = date.getSeconds()
if(date.getMonth() + 1 <= 9) {
gmonth = "0" + (date.getMonth() + 1)
}
if(date.getDate() + 1 <= 9) {
gday = "0" + date.getDate()
}
if(date.getHours() + 1 <= 9) {
gHour = "0" + date.getHours()
}
if(date.getMinutes() + 1 <= 9) {
gMinute = "0" + date.getMinutes()
}
if(date.getSeconds() + 1 <= 9) {
gSecondes = "0" + date.getSeconds()
}
var currentDate = date.getFullYear() + "-" + gmonth + "-" + gday + "-" + gHour + "h" + "-" + gMinute + "m" + "-" + gSecondes + "s"
console.log("[Subsonics-Discord] - " + currentDate + " - " + message)
}
module.exports.bot.error = (message) => {
var date = new Date()
// [Date Format] - Format de la date
var gmonth = date.getMonth()
var gday = date.getDate()
var gHour = date.getHours()
var gMinute = date.getMinutes()
var gSecondes = date.getSeconds()
if(date.getMonth() + 1 <= 9) {
gmonth = "0" + (date.getMonth() + 1)
}
if(date.getDate() + 1 <= 9) {
gday = "0" + date.getDate()
}
if(date.getHours() + 1 <= 9) {
gHour = "0" + date.getHours()
}
if(date.getMinutes() + 1 <= 9) {
gMinute = "0" + date.getMinutes()
}
if(date.getSeconds() + 1 <= 9) {
gSecondes = "0" + date.getSeconds()
}
var currentDate = date.getFullYear() + "-" + gmonth + "-" + gday + "-" + gHour + "h" + "-" + gMinute + "m" + "-" + gSecondes + "s"
console.error("[Subsonics-Discord] - [ERROR] - " + currentDate + " - ")
console.error(message)
}

444
src/tokens.json Normal file
View File

@ -0,0 +1,444 @@
{
"6bde63c8-6b74-4fb5-98d8-87c8c203c16b": {
"id": "486943594893017119",
"username": "Raphix",
"global_name": null,
"display_name": null,
"avatar": "883ec1a7136b0aa3c22e4bdc33e278e5",
"discriminator": "8434",
"public_flags": 4194368,
"flags": 4194368,
"banner": null,
"banner_color": "#ff4d4d",
"accent_color": 16731469,
"locale": "fr",
"mfa_enabled": true,
"premium_type": 0,
"avatar_decoration": null
},
"3bdca403-b9d2-47b8-b9c4-3818b324a76f": {
"id": "486943594893017119",
"username": "Raphix",
"global_name": null,
"display_name": null,
"avatar": "883ec1a7136b0aa3c22e4bdc33e278e5",
"discriminator": "8434",
"public_flags": 4194368,
"flags": 4194368,
"banner": null,
"banner_color": "#ff4d4d",
"accent_color": 16731469,
"locale": "fr",
"mfa_enabled": true,
"premium_type": 0,
"avatar_decoration": null
},
"aac35fb6-5c16-4d29-a1e6-6abc43ce5008": {
"id": "486943594893017119",
"username": "Raphix",
"global_name": null,
"display_name": null,
"avatar": "883ec1a7136b0aa3c22e4bdc33e278e5",
"discriminator": "8434",
"public_flags": 4194368,
"flags": 4194368,
"banner": null,
"banner_color": "#ff4d4d",
"accent_color": 16731469,
"locale": "fr",
"mfa_enabled": true,
"premium_type": 0,
"avatar_decoration": null
},
"750f0802-7d9c-4263-b2dd-f27d47029e8b": {
"id": "486943594893017119",
"username": "Raphix",
"global_name": null,
"display_name": null,
"avatar": "883ec1a7136b0aa3c22e4bdc33e278e5",
"discriminator": "8434",
"public_flags": 4194368,
"flags": 4194368,
"banner": null,
"banner_color": "#ff4d4d",
"accent_color": 16731469,
"locale": "fr",
"mfa_enabled": true,
"premium_type": 0,
"avatar_decoration": null
},
"c416c176-157e-40a9-ae32-23cfcf812dd4": {
"id": "486943594893017119",
"username": "Raphix",
"global_name": null,
"display_name": null,
"avatar": "883ec1a7136b0aa3c22e4bdc33e278e5",
"discriminator": "8434",
"public_flags": 4194368,
"flags": 4194368,
"banner": null,
"banner_color": "#ff4d4d",
"accent_color": 16731469,
"locale": "fr",
"mfa_enabled": true,
"premium_type": 0,
"avatar_decoration": null
},
"5ef772f4-e729-4ccc-9c23-25d7cc4b2c64": {
"id": "486943594893017119",
"username": "Raphix",
"global_name": null,
"display_name": null,
"avatar": "883ec1a7136b0aa3c22e4bdc33e278e5",
"discriminator": "8434",
"public_flags": 4194368,
"flags": 4194368,
"banner": null,
"banner_color": "#ff4d4d",
"accent_color": 16731469,
"locale": "fr",
"mfa_enabled": true,
"premium_type": 0,
"avatar_decoration": null
},
"b5b7d954-49b6-43b4-a237-08e41f3e6f58": {
"id": "486943594893017119",
"username": "Raphix",
"global_name": null,
"display_name": null,
"avatar": "883ec1a7136b0aa3c22e4bdc33e278e5",
"discriminator": "8434",
"public_flags": 4194368,
"flags": 4194368,
"banner": null,
"banner_color": "#ff4d4d",
"accent_color": 16731469,
"locale": "fr",
"mfa_enabled": true,
"premium_type": 0,
"avatar_decoration": null
},
"27e00135-65fa-43d5-820c-e35bb906d47c": {
"id": "486943594893017119",
"username": "Raphix",
"global_name": null,
"display_name": null,
"avatar": "883ec1a7136b0aa3c22e4bdc33e278e5",
"discriminator": "8434",
"public_flags": 4194368,
"flags": 4194368,
"banner": null,
"banner_color": "#ff4d4d",
"accent_color": 16731469,
"locale": "fr",
"mfa_enabled": true,
"premium_type": 0,
"avatar_decoration": null
},
"04cb0b39-a29e-4dc2-a6e8-31651a4382a5": {
"id": "486943594893017119",
"username": "Raphix",
"global_name": null,
"display_name": null,
"avatar": "883ec1a7136b0aa3c22e4bdc33e278e5",
"discriminator": "8434",
"public_flags": 4194368,
"flags": 4194368,
"banner": null,
"banner_color": "#ff4d4d",
"accent_color": 16731469,
"locale": "fr",
"mfa_enabled": true,
"premium_type": 0,
"avatar_decoration": null
},
"e79cbf92-0e97-4522-9430-54e87a1998d3": {
"id": "486943594893017119",
"username": "Raphix",
"global_name": null,
"display_name": null,
"avatar": "883ec1a7136b0aa3c22e4bdc33e278e5",
"discriminator": "8434",
"public_flags": 4194368,
"flags": 4194368,
"banner": null,
"banner_color": "#ff4d4d",
"accent_color": 16731469,
"locale": "fr",
"mfa_enabled": true,
"premium_type": 0,
"avatar_decoration": null
},
"da77741c-e550-43f0-b4e8-86060fd7e784": {
"id": "486943594893017119",
"username": "Raphix",
"global_name": null,
"display_name": null,
"avatar": "883ec1a7136b0aa3c22e4bdc33e278e5",
"discriminator": "8434",
"public_flags": 4194368,
"flags": 4194368,
"banner": null,
"banner_color": "#ff4d4d",
"accent_color": 16731469,
"locale": "fr",
"mfa_enabled": true,
"premium_type": 0,
"avatar_decoration": null
},
"c89a8d5c-a5f7-409a-9ca5-3d27f40bc073": {
"id": "486943594893017119",
"username": "Raphix",
"global_name": null,
"display_name": null,
"avatar": "883ec1a7136b0aa3c22e4bdc33e278e5",
"discriminator": "8434",
"public_flags": 4194368,
"flags": 4194368,
"banner": null,
"banner_color": "#ff4d4d",
"accent_color": 16731469,
"locale": "fr",
"mfa_enabled": true,
"premium_type": 0,
"avatar_decoration": null
},
"6726b668-25f4-4d3f-8440-b6a4cc002c7d": {
"id": "486943594893017119",
"username": "Raphix",
"global_name": null,
"display_name": null,
"avatar": "883ec1a7136b0aa3c22e4bdc33e278e5",
"discriminator": "8434",
"public_flags": 4194368,
"flags": 4194368,
"banner": null,
"banner_color": "#ff4d4d",
"accent_color": 16731469,
"locale": "fr",
"mfa_enabled": true,
"premium_type": 0,
"avatar_decoration": null
},
"41769f38-1cab-44b9-b96f-09261fe5c3d0": {
"id": "486943594893017119",
"username": "Raphix",
"global_name": null,
"display_name": null,
"avatar": "883ec1a7136b0aa3c22e4bdc33e278e5",
"discriminator": "8434",
"public_flags": 4194368,
"flags": 4194368,
"banner": null,
"banner_color": "#ff4d4d",
"accent_color": 16731469,
"locale": "fr",
"mfa_enabled": true,
"premium_type": 0,
"avatar_decoration": null
},
"cc20f4c2-9b35-4846-9b00-e3d09be6e273": {
"id": "486943594893017119",
"username": "Raphix",
"global_name": null,
"display_name": null,
"avatar": "883ec1a7136b0aa3c22e4bdc33e278e5",
"discriminator": "8434",
"public_flags": 4194368,
"flags": 4194368,
"banner": null,
"banner_color": "#ff4d4d",
"accent_color": 16731469,
"locale": "fr",
"mfa_enabled": true,
"premium_type": 0,
"avatar_decoration": null
},
"39faa9aa-e569-498b-8a7f-0dc59a871499": {
"id": "486943594893017119",
"username": "Raphix",
"global_name": null,
"display_name": null,
"avatar": "883ec1a7136b0aa3c22e4bdc33e278e5",
"discriminator": "8434",
"public_flags": 4194368,
"flags": 4194368,
"banner": null,
"banner_color": "#ff4d4d",
"accent_color": 16731469,
"locale": "fr",
"mfa_enabled": true,
"premium_type": 0,
"avatar_decoration": null
},
"3c1e29d2-5678-4799-a658-6a4b2c928a4e": {
"id": "486943594893017119",
"username": "Raphix",
"global_name": null,
"display_name": null,
"avatar": "883ec1a7136b0aa3c22e4bdc33e278e5",
"discriminator": "8434",
"public_flags": 4194368,
"flags": 4194368,
"banner": null,
"banner_color": "#ff4d4d",
"accent_color": 16731469,
"locale": "fr",
"mfa_enabled": true,
"premium_type": 0,
"avatar_decoration": null
},
"a4e19e96-9810-410b-a8c4-9952c334d2f0": {
"id": "486943594893017119",
"username": "Raphix",
"global_name": null,
"display_name": null,
"avatar": "883ec1a7136b0aa3c22e4bdc33e278e5",
"discriminator": "8434",
"public_flags": 4194368,
"flags": 4194368,
"banner": null,
"banner_color": "#ff4d4d",
"accent_color": 16731469,
"locale": "fr",
"mfa_enabled": true,
"premium_type": 0,
"avatar_decoration": null
},
"af666d26-811e-4bb6-832f-aef39dec9578": {
"id": "486943594893017119",
"username": "Raphix",
"global_name": null,
"display_name": null,
"avatar": "883ec1a7136b0aa3c22e4bdc33e278e5",
"discriminator": "8434",
"public_flags": 4194368,
"flags": 4194368,
"banner": null,
"banner_color": "#ff4d4d",
"accent_color": 16731469,
"locale": "fr",
"mfa_enabled": true,
"premium_type": 0,
"avatar_decoration": null
},
"fe83ad11-88c5-4642-96ec-d115ce3346bf": {
"id": "486943594893017119",
"username": "Raphix",
"global_name": null,
"display_name": null,
"avatar": "883ec1a7136b0aa3c22e4bdc33e278e5",
"discriminator": "8434",
"public_flags": 4194368,
"flags": 4194368,
"banner": null,
"banner_color": "#ff4d4d",
"accent_color": 16731469,
"locale": "fr",
"mfa_enabled": true,
"premium_type": 0,
"avatar_decoration": null
},
"e9dc3b80-44d2-4caf-a688-b37af348518a": {
"id": "486943594893017119",
"username": "Raphix",
"global_name": null,
"display_name": null,
"avatar": "883ec1a7136b0aa3c22e4bdc33e278e5",
"discriminator": "8434",
"public_flags": 4194368,
"flags": 4194368,
"banner": null,
"banner_color": "#ff4d4d",
"accent_color": 16731469,
"locale": "fr",
"mfa_enabled": true,
"premium_type": 0,
"avatar_decoration": null
},
"bcd84469-7d83-4343-ae87-5f2d28e4d2ce": {
"id": "486943594893017119",
"username": "Raphix",
"global_name": null,
"display_name": null,
"avatar": "883ec1a7136b0aa3c22e4bdc33e278e5",
"discriminator": "8434",
"public_flags": 4194368,
"flags": 4194368,
"banner": null,
"banner_color": "#ff4d4d",
"accent_color": 16731469,
"locale": "fr",
"mfa_enabled": true,
"premium_type": 0,
"avatar_decoration": null
},
"bf7dcd93-9efe-40f4-9037-aef9dfea6a5c": {
"id": "486943594893017119",
"username": "Raphix",
"global_name": null,
"display_name": null,
"avatar": "883ec1a7136b0aa3c22e4bdc33e278e5",
"discriminator": "8434",
"public_flags": 4194368,
"flags": 4194368,
"banner": null,
"banner_color": "#ff4d4d",
"accent_color": 16731469,
"locale": "fr",
"mfa_enabled": true,
"premium_type": 0,
"avatar_decoration": null
},
"867f8379-3927-42b2-85e8-4df3ced2eddb": {
"id": "486943594893017119",
"username": "Raphix",
"global_name": null,
"display_name": null,
"avatar": "883ec1a7136b0aa3c22e4bdc33e278e5",
"discriminator": "8434",
"public_flags": 4194368,
"flags": 4194368,
"banner": null,
"banner_color": "#ff4d4d",
"accent_color": 16731469,
"locale": "fr",
"mfa_enabled": true,
"premium_type": 0,
"avatar_decoration": null
},
"75a3e38c-eed5-462c-bde8-067dd16ca391": {
"id": "486943594893017119",
"username": "Raphix",
"global_name": null,
"display_name": null,
"avatar": "883ec1a7136b0aa3c22e4bdc33e278e5",
"discriminator": "8434",
"public_flags": 4194368,
"flags": 4194368,
"banner": null,
"banner_color": "#ff4d4d",
"accent_color": 16731469,
"locale": "fr",
"mfa_enabled": true,
"premium_type": 0,
"avatar_decoration": null
},
"d35acbb8-4a3b-4286-8df6-2ab61cb2c74e": {
"id": "486943594893017119",
"username": "Raphix",
"global_name": null,
"display_name": null,
"avatar": "883ec1a7136b0aa3c22e4bdc33e278e5",
"discriminator": "8434",
"public_flags": 4194368,
"flags": 4194368,
"banner": null,
"banner_color": "#ff4d4d",
"accent_color": 16731469,
"locale": "fr",
"mfa_enabled": true,
"premium_type": 0,
"avatar_decoration": null
}
}