player list features
This commit is contained in:
4 files changed
+106
-10
No files matched your search
@@ -90,6 +90,20 @@ module.exports = {
|
||||
required: true,
|
||||
}]
|
||||
},
|
||||
{
|
||||
name: "active_players_channel",
|
||||
description: "Set the channel for active players update",
|
||||
value: "active_players_channel",
|
||||
type: 1,
|
||||
options: [{
|
||||
name: "channel",
|
||||
description: "The channel to configure",
|
||||
value: "channel",
|
||||
type: 7,
|
||||
channel_types: [0], // Restrict to text channel
|
||||
required: true,
|
||||
}]
|
||||
},
|
||||
{
|
||||
name: "linked_gt_role",
|
||||
description: "Access Role to give to users",
|
||||
@@ -382,6 +396,19 @@ module.exports = {
|
||||
|
||||
return interaction.send({ embeds: [successEmbed] });
|
||||
|
||||
} else if (args[0].name == 'active_players_channel') {
|
||||
const channel = args[0].options[0].value;
|
||||
|
||||
client.dbo.collection("guilds").updateOne({"server.serverID":GuildDB.serverID},{$set: {"server.activePlayersChannel": channel}}, function(err, res) {
|
||||
if (err) return client.sendInternalError(interaction, err);
|
||||
});
|
||||
|
||||
const successEmbed = new EmbedBuilder()
|
||||
.setDescription(`Successfully set <#${channel}> as the Active Players Channel.`)
|
||||
.setColor(client.config.Colors.Green);
|
||||
|
||||
return interaction.send({ embeds: [successEmbed] });
|
||||
|
||||
} else if (args[0].name == 'linked_gt_role') {
|
||||
const role = args[0].options[0].value;
|
||||
|
||||
|
||||
Reference in new issue
Block a user