This repository has been archived by the owner on Jul 15, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: new public cmds + renamed cmd folderes
- Loading branch information
Showing
23 changed files
with
129 additions
and
104 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
const emoji = require("../../config.json").emojis; | ||
|
||
const devSchema = require("../../models/devSchema"); | ||
|
||
module.exports = { | ||
name: "developers", | ||
description: "Get a list of all the developers.", | ||
options: [], | ||
default_member_permissions: null, | ||
botPermissions: [], | ||
cooldown: 0, | ||
enabled: true, | ||
hidden: true, | ||
async execute(interaction, client, Discord) { | ||
try { | ||
const devs = await devSchema.find(); | ||
|
||
const users = []; | ||
|
||
for(const user of devs) { | ||
users.push(user._id); | ||
} | ||
|
||
if(!users.length) { | ||
const error = new Discord.EmbedBuilder() | ||
.setColor(client.config_embeds.error) | ||
.setDescription(`${emoji.error} There are no developers!`) | ||
|
||
await interaction.editReply({ embeds: [error], ephemeral: true }); | ||
return; | ||
} | ||
|
||
const developers = new Discord.EmbedBuilder() | ||
.setColor(client.config_embeds.default) | ||
.setTitle("💻 Developers") | ||
.setDescription(`<@${users.join(">\n<@")}>`) | ||
|
||
await interaction.editReply({ embeds: [developers] }); | ||
} catch(err) { | ||
client.logCommandError(err, interaction, Discord); | ||
} | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
const emoji = require("../../config.json").emojis; | ||
|
||
const modSchema = require("../../models/modSchema"); | ||
|
||
module.exports = { | ||
name: "moderators", | ||
description: "Get a list of all the moderators.", | ||
options: [], | ||
default_member_permissions: null, | ||
botPermissions: [], | ||
cooldown: 0, | ||
enabled: true, | ||
hidden: true, | ||
async execute(interaction, client, Discord) { | ||
try { | ||
const mods = await modSchema.find(); | ||
|
||
const users = []; | ||
|
||
for(const user of mods) { | ||
users.push(user._id); | ||
} | ||
|
||
if(!users.length) { | ||
const error = new Discord.EmbedBuilder() | ||
.setColor(client.config_embeds.error) | ||
.setDescription(`${emoji.error} There are no moderators!`) | ||
|
||
await interaction.editReply({ embeds: [error], ephemeral: true }); | ||
return; | ||
} | ||
|
||
const moderators = new Discord.EmbedBuilder() | ||
.setColor(client.config_embeds.default) | ||
.setTitle("🔨 Moderators") | ||
.setDescription(`<@${users.join(">\n<@")}>`) | ||
|
||
await interaction.editReply({ embeds: [moderators] }); | ||
} catch(err) { | ||
client.logCommandError(err, interaction, Discord); | ||
} | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
const emoji = require("../../config.json").emojis; | ||
|
||
module.exports = { | ||
name: "supporters", | ||
description: "Get a list of all the supporters.", | ||
options: [], | ||
default_member_permissions: null, | ||
botPermissions: [], | ||
cooldown: 0, | ||
enabled: true, | ||
hidden: true, | ||
async execute(interaction, client, Discord) { | ||
try { | ||
const guild = await client.guilds.fetch(client.config_default.guild); | ||
const members = await guild.members.fetch(); | ||
const boosters = members.filter(member => member.premiumSinceTimestamp); | ||
|
||
const users = []; | ||
|
||
for(const [userId, guildMember] of boosters) { | ||
users.push(userId); | ||
} | ||
|
||
if(!users.length) { | ||
const error = new Discord.EmbedBuilder() | ||
.setColor(client.config_embeds.error) | ||
.setDescription(`${emoji.error} There are no supporters!`) | ||
|
||
await interaction.editReply({ embeds: [error], ephemeral: true }); | ||
return; | ||
} | ||
|
||
const supporters = new Discord.EmbedBuilder() | ||
.setColor(client.config_embeds.default) | ||
.setTitle("💖 Supporters") | ||
.setDescription(`<@${users.join(">\n<@")}>`) | ||
|
||
await interaction.editReply({ embeds: [supporters] }); | ||
} catch(err) { | ||
client.logCommandError(err, interaction, Discord); | ||
} | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.