Compare commits
No commits in common. "f07a6d9386ae7392987cb6c5e06ce8872b3f189b" and "e4665c34f98824ccc690a1b71d98538ebd747a0b" have entirely different histories.
f07a6d9386
...
e4665c34f9
@ -82,5 +82,4 @@ module.exports = {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
40
src/main.js
40
src/main.js
@ -30,13 +30,11 @@ function startDiscordBot() {
|
||||
const { Manager } = require("erela.js")
|
||||
|
||||
|
||||
|
||||
const client = new Client({
|
||||
intents:[GatewayIntentBits.Guilds, GatewayIntentBits.GuildVoiceStates, GatewayIntentBits.GuildMembers],
|
||||
})
|
||||
|
||||
|
||||
|
||||
client.commands = new Collection()
|
||||
client.dictator = false;
|
||||
|
||||
@ -262,7 +260,7 @@ function startServer(client) {
|
||||
|
||||
if(users.has(token)) {
|
||||
|
||||
log.server("Recherche avec les mots clés : " + value + " de musique de " + users.get(token).username)
|
||||
log.server("Recherche avec les mots clés : " + value + " de musique de " + users.get(token).username + "#" + users.get(token).discriminator)
|
||||
|
||||
find()
|
||||
|
||||
@ -303,7 +301,7 @@ function startServer(client) {
|
||||
player.queue.add(songtrack.tracks[0])
|
||||
|
||||
|
||||
log.server("Lecture / Ajout du titre : " + songtrack.tracks[0].title + " de musique de " + users.get(token).username)
|
||||
log.server("Lecture / Ajout du titre : " + songtrack.tracks[0].title + " de musique de " + users.get(token).username + "#" + users.get(token).discriminator)
|
||||
|
||||
if(!player.playing) {
|
||||
|
||||
@ -348,7 +346,7 @@ function startServer(client) {
|
||||
if(users.has(token)) {
|
||||
answer = true
|
||||
|
||||
log.server("Connexion au serveur par Token - SOCKET_ID : " + socket.id + " - DISCORD_USER : " + users.get(token).username)
|
||||
log.server("Connexion au serveur par Token - SOCKET_ID : " + socket.id + " - DISCORD_USER : " + users.get(token).username + "#" + users.get(token).discriminator)
|
||||
actualize()
|
||||
}
|
||||
|
||||
@ -358,7 +356,7 @@ function startServer(client) {
|
||||
socket.on("getState", (token) => {
|
||||
|
||||
const data = {
|
||||
"username":users.get(token).username,
|
||||
"username":users.get(token).username + "#" + users.get(token).discriminator,
|
||||
"avatar": users.get(token).avatar,
|
||||
"id": users.get(token).id,
|
||||
}
|
||||
@ -375,7 +373,7 @@ function startServer(client) {
|
||||
socket.on("play", (token) => {
|
||||
if(users.has(token)) {
|
||||
|
||||
log.server("Mise en Play / Pause demandé par " + users.get(token).username)
|
||||
log.server("Mise en Play / Pause demandé par " + users.get(token).username + "#" + users.get(token).discriminator)
|
||||
|
||||
|
||||
let player = client.manager.players.get("137291455336022018")
|
||||
@ -406,7 +404,7 @@ function startServer(client) {
|
||||
if(users.has(token)) {
|
||||
|
||||
|
||||
log.server("Avancement demandé par " + users.get(token).username)
|
||||
log.server("Avancement demandé par " + users.get(token).username + "#" + users.get(token).discriminator)
|
||||
|
||||
let player = client.manager.players.get("137291455336022018")
|
||||
|
||||
@ -427,7 +425,7 @@ function startServer(client) {
|
||||
if(users.has(token)) {
|
||||
|
||||
|
||||
log.server("Changement de volume demandé par " + users.get(token).username)
|
||||
log.server("Changement de volume demandé par " + users.get(token).username + "#" + users.get(token).discriminator)
|
||||
|
||||
let player = client.manager.players.get("137291455336022018")
|
||||
|
||||
@ -448,7 +446,7 @@ function startServer(client) {
|
||||
if(users.has(token)) {
|
||||
|
||||
|
||||
log.server("Clear liste demandé par " + users.get(token).username)
|
||||
log.server("Clear liste demandé par " + users.get(token).username + "#" + users.get(token).discriminator)
|
||||
|
||||
let player = client.manager.players.get("137291455336022018")
|
||||
|
||||
@ -470,13 +468,13 @@ function startServer(client) {
|
||||
|
||||
const { EmbedBuilder } = require("discord.js")
|
||||
|
||||
log.server("Bug report demandé par " + users.get(token).username)
|
||||
log.server("Bug report demandé par " + users.get(token).username + "#" + users.get(token).discriminator)
|
||||
var embed = null
|
||||
|
||||
if(report.type == "Bug") {
|
||||
embed = new EmbedBuilder()
|
||||
.setColor(0xff0000)
|
||||
.setTitle('Bug report de ' + users.get(token).username)
|
||||
.setTitle('Bug report de ' + users.get(token).username + "#" + users.get(token).discriminator)
|
||||
.setDescription('**Version **' + report.version)
|
||||
.addFields({name: "Description", value: report.text})
|
||||
.setTimestamp();
|
||||
@ -485,7 +483,7 @@ function startServer(client) {
|
||||
} else {
|
||||
embed = new EmbedBuilder()
|
||||
.setColor(0x0000ff)
|
||||
.setTitle('Suggestion de ' + users.get(token).username)
|
||||
.setTitle('Suggestion de ' + users.get(token).username + "#" + users.get(token).discriminator)
|
||||
.setDescription('**Version **' + report.version)
|
||||
.addFields({name: "Description", value: report.text})
|
||||
.setTimestamp();
|
||||
@ -523,7 +521,7 @@ function startServer(client) {
|
||||
|
||||
if(player) {
|
||||
|
||||
log.server("Supression (n°" + identifier + ") d'un morceau demandé par " + users.get(token).username )
|
||||
log.server("Supression (n°" + identifier + ") d'un morceau demandé par " + users.get(token).username + "#" + users.get(token).discriminator)
|
||||
|
||||
player.queue.remove(identifier)
|
||||
|
||||
@ -546,7 +544,7 @@ function startServer(client) {
|
||||
|
||||
if(player) {
|
||||
|
||||
log.server("Déplacement (n°" + identifier + ") d'un morceau demandé par " + users.get(token).username )
|
||||
log.server("Déplacement (n°" + identifier + ") d'un morceau demandé par " + users.get(token).username + "#" + users.get(token).discriminator)
|
||||
|
||||
|
||||
let elementToMove = player.queue[identifier];
|
||||
@ -569,7 +567,7 @@ function startServer(client) {
|
||||
|
||||
if(users.has(token)) {
|
||||
|
||||
log.server("Retour arrière demandé par " + users.get(token).username)
|
||||
log.server("Retour arrière demandé par " + users.get(token).username + "#" + users.get(token).discriminator)
|
||||
|
||||
let player = client.manager.players.get("137291455336022018")
|
||||
|
||||
@ -597,7 +595,7 @@ function startServer(client) {
|
||||
|
||||
if(users.has(token)) {
|
||||
|
||||
log.server("Skip demandé par " + users.get(token).username)
|
||||
log.server("Skip demandé par " + users.get(token).username + "#" + users.get(token).discriminator)
|
||||
|
||||
let player = client.manager.players.get("137291455336022018")
|
||||
|
||||
@ -628,7 +626,7 @@ function startServer(client) {
|
||||
|
||||
let player = client.manager.players.get("137291455336022018")
|
||||
|
||||
log.server("Looping demandé par " + users.get(token).username)
|
||||
log.server("Looping demandé par " + users.get(token).username + "#" + users.get(token).discriminator)
|
||||
|
||||
if(player) {
|
||||
|
||||
@ -655,7 +653,7 @@ function startServer(client) {
|
||||
|
||||
if(users.has(token)) {
|
||||
|
||||
log.server("Skip demandé par " + users.get(token).username)
|
||||
log.server("Skip demandé par " + users.get(token).username + "#" + users.get(token).discriminator)
|
||||
|
||||
let player = client.manager.players.get("137291455336022018")
|
||||
|
||||
@ -677,7 +675,7 @@ function startServer(client) {
|
||||
|
||||
if(users.has(token)) {
|
||||
|
||||
log.server("Restart demandé par " + users.get(token).username)
|
||||
log.server("Restart demandé par " + users.get(token).username + "#" + users.get(token).discriminator)
|
||||
|
||||
let player = client.manager.players.get("137291455336022018")
|
||||
|
||||
@ -989,7 +987,7 @@ function startServer(client) {
|
||||
|
||||
|
||||
|
||||
log.server("Discord Auth : [IDENTITE] : Nouvelle identité - SOCKET_ID : " + socket.id + " - DISCORD_USER : " + response.username)
|
||||
log.server("Discord Auth : [IDENTITE] : Nouvelle identité - SOCKET_ID : " + socket.id + " - DISCORD_USER : " + response.username + "#" + response.discriminator)
|
||||
|
||||
|
||||
const tokens = require(__dirname + path.sep + "tokens.json")
|
||||
|
Loading…
x
Reference in New Issue
Block a user