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: username system update + other stuff
- Don't use `@` in new usernames - Remove `/credits`, is now a button response on `/bot` - Remove statistics embed from `/bot`, is now a button response - Remove unused sentry-api endpoints
- Loading branch information
Showing
42 changed files
with
133 additions
and
153 deletions.
There are no files selected for viewing
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
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.
15 changes: 3 additions & 12 deletions
15
src/commands/info/credits.js → src/buttons/info/credits.js
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 |
---|---|---|
@@ -1,29 +1,20 @@ | ||
module.exports = { | ||
name: "credits", | ||
description: "Credits for the bot.", | ||
options: [], | ||
default_member_permissions: null, | ||
botPermissions: [], | ||
startsWith: false, | ||
requiredRoles: [], | ||
cooldown: 5, | ||
enabled: true, | ||
hidden: false, | ||
deferReply: true, | ||
ephemeral: true, | ||
async execute(interaction, client, Discord) { | ||
try { | ||
const credits = new Discord.EmbedBuilder() | ||
.setColor(client.config_embeds.default) | ||
.setTitle("Credits") | ||
.addFields ( | ||
{ name: "💻 Developer", value: "[@william.harrison](https://discord.com/users/853158265466257448)" }, | ||
{ name: "🪝 Webhook System", value: "[@andrewstech](https://discord.com/users/598245488977903688)" }, | ||
{ name: "💡 Bot Inspiration", value: "[@sx9dev](https://discord.com/users/882595027132493864)" } | ||
) | ||
|
||
await interaction.editReply({ embeds: [credits] }); | ||
await interaction.reply({ embeds: [credits], ephemeral: true }); | ||
} catch(err) { | ||
client.logCommandError(err, interaction, Discord); | ||
client.logButtonError(err, interaction, Discord); | ||
} | ||
} | ||
} |
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,48 @@ | ||
const devSchema = require("../../models/devSchema"); | ||
const messageSchema = require("../../models/messageSchema"); | ||
const modSchema = require("../../models/modSchema"); | ||
const verifiedSchema = require("../../models/verifiedSchema"); | ||
|
||
module.exports = { | ||
name: "statistics", | ||
startsWith: false, | ||
requiredRoles: [], | ||
async execute(interaction, client, Discord) { | ||
try { | ||
await interaction.deferReply({ ephemeral: true }); | ||
|
||
const developers = await devSchema.find(); | ||
const moderators = await modSchema.find(); | ||
const verifiedUsers = await verifiedSchema.find(); | ||
const messages = await messageSchema.find(); | ||
const images = await messageSchema.find({ attachment: { $ne: null } }); | ||
|
||
const guild = await client.guilds.fetch(client.config_default.guild); | ||
const members = await guild.members.fetch(); | ||
const boosters = members.filter(member => member.premiumSinceTimestamp); | ||
|
||
const stat_guilds = `🗄️ ${client.guilds.cache.size} Guild${client.guilds.cache.size === 1 ? "" : "s"}`; | ||
const stat_users = `👤 ${client.users.cache.size} User${client.users.cache.size === 1 ? "" : "s"}`; | ||
|
||
const stat_developers = `💻 ${developers.length} Developer${developers.length === 1 ? "" : "s"}`; | ||
const stat_moderators = `🔨 ${moderators.length} Moderator${moderators.length === 1 ? "" : "s"}`; | ||
const stat_verified = `✅ ${verifiedUsers.length} Verified User${verifiedUsers.length === 1 ? "" : "s"}`; | ||
const stat_supporters = `💖 ${boosters.size} Supporter${boosters.size === 1 ? "" : "s"}`; | ||
|
||
const stat_messages = `💬 ${messages.length} Message${messages.length === 1 ? "" : "s"}`; | ||
const stat_images = `🖼️ ${images.length} Image${images.length === 1 ? "" : "s"}`; | ||
|
||
const statistics = new Discord.EmbedBuilder() | ||
.setColor(client.config_embeds.default) | ||
.addFields ( | ||
{ name: "🤖 Bot", value: `${stat_guilds}\n${stat_users}` }, | ||
{ name: "🎭 Roles", value: `${stat_developers}\n${stat_moderators}\n${stat_verified}\n${stat_supporters}` }, | ||
{ name: "🌐 Global Chat", value: `${stat_messages}\n${stat_images}` } | ||
) | ||
|
||
await interaction.editReply({ embeds: [statistics] }); | ||
} catch(err) { | ||
client.logButtonError(err, interaction, Discord); | ||
} | ||
} | ||
} |
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
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
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
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
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
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
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
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
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
Oops, something went wrong.