mirror of
https://github.com/arthur-pbty/gestion.git
synced 2026-06-15 08:13:06 +02:00
add competing
This commit is contained in:
@@ -1,25 +0,0 @@
|
|||||||
const { ActivityType } = require("discord.js");
|
|
||||||
|
|
||||||
module.exports = {
|
|
||||||
name: 'competion',
|
|
||||||
aliases: ['compet'],
|
|
||||||
description: 'Changer le status du bot en competition',
|
|
||||||
emote: '🎤',
|
|
||||||
utilisation: 'compet <status>',
|
|
||||||
category: 'botcontrol',
|
|
||||||
|
|
||||||
async execute(message, args, client) {
|
|
||||||
const streamText = args.join(' ') || 'Streaming';
|
|
||||||
const streamURL = 'https://www.twitch.tv/valou336_yt';
|
|
||||||
|
|
||||||
client.user.setPresence({
|
|
||||||
activities: [{
|
|
||||||
name: streamText,
|
|
||||||
type: ActivityType.Competing,
|
|
||||||
url: streamURL
|
|
||||||
}]
|
|
||||||
});
|
|
||||||
|
|
||||||
message.channel.send(`Le bot est maintenant en compétition : ${streamText}`);
|
|
||||||
},
|
|
||||||
};
|
|
||||||
@@ -58,6 +58,12 @@ module.exports = {
|
|||||||
value: 'watching',
|
value: 'watching',
|
||||||
description: 'Le bot regarde',
|
description: 'Le bot regarde',
|
||||||
emoji: '👀'
|
emoji: '👀'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Competition',
|
||||||
|
value: 'competing',
|
||||||
|
description: 'Le bot participe à',
|
||||||
|
emoji: '🕹️'
|
||||||
}
|
}
|
||||||
]);
|
]);
|
||||||
|
|
||||||
@@ -112,6 +118,14 @@ module.exports = {
|
|||||||
url: url
|
url: url
|
||||||
}]
|
}]
|
||||||
});
|
});
|
||||||
|
} else if (value === 'competing') {
|
||||||
|
client.user.setPresence({
|
||||||
|
activities: [{
|
||||||
|
name: text,
|
||||||
|
type: ActivityType.Competing,
|
||||||
|
url: url
|
||||||
|
}]
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user