New Version to add Presence
All checks were successful
Subsonics - Pipeline/pipeline/head This commit looks good
All checks were successful
Subsonics - Pipeline/pipeline/head This commit looks good
This commit is contained in:
parent
1a44f8d8db
commit
cdf5f0cf84
14
src/main.js
14
src/main.js
@ -21,7 +21,7 @@ function startDiscordBot() {
|
||||
|
||||
|
||||
|
||||
const { Client, GatewayIntentBits, Collection } = require("discord.js")
|
||||
const { Client, GatewayIntentBits, Collection, ActivityType } = require("discord.js")
|
||||
const { REST, Routes } = require("discord.js")
|
||||
const fs = require("node:fs")
|
||||
const config = require("./config.json")
|
||||
@ -747,6 +747,7 @@ function startServer(client) {
|
||||
|
||||
if(player) {
|
||||
|
||||
|
||||
data["current"] = player.queue.current
|
||||
|
||||
if(player.queueRepeat == true) {
|
||||
@ -760,6 +761,17 @@ function startServer(client) {
|
||||
if(player.queue.current) {
|
||||
data["durationNow"] = player.position
|
||||
data["durationAll"] = player.queue.current.duration
|
||||
|
||||
client.user.setPresence({
|
||||
activities: [{ name: player.queue.current.title, type: ActivityType.Listening }],
|
||||
status: 'dnd',
|
||||
});
|
||||
|
||||
} else {
|
||||
client.user.setPresence({
|
||||
activities: [{ name: `rien pour le moment`, type: ActivityType.Listening }],
|
||||
status: 'dnd',
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user