Merge branch 'dev' into 'main'
Updated all color vars to new one See merge request illegitimate/illegitimate-bot!209
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { ApplicationCommandType, ContextMenuCommandBuilder, PermissionFlagsBits, userMention } from "discord.js"
|
||||
import { color, devMessage, hypixelGuildID } from "config/options"
|
||||
import { embedColor, devMessage, hypixelGuildID } from "config/options"
|
||||
import { ContextMenu } from "interfaces"
|
||||
import verifySchema from "schemas/verifySchema"
|
||||
import { getGuild, getHeadURL, getIGN } from "utils/Hypixel"
|
||||
@@ -23,7 +23,6 @@ export = {
|
||||
const user = await interaction.guild!.members.fetch(targetId)
|
||||
const usermentioned = userMention(user.user.id)
|
||||
const verifyData = await verifySchema.findOne({ userID: user.user.id })
|
||||
const embedColor = Number(color.replace("#", "0x"))
|
||||
|
||||
if (!verifyData) {
|
||||
await interaction.editReply({
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { SlashCommandBuilder, PermissionFlagsBits, userMention, GuildMember, } from "discord.js"
|
||||
import { admin, helper } from "config/roles"
|
||||
import { color, devMessage } from "config/options"
|
||||
import { embedColor, devMessage } from "config/options"
|
||||
import { Command } from "interfaces"
|
||||
import logToChannel from "utils/functions/logtochannel"
|
||||
|
||||
@@ -47,7 +47,6 @@ export = {
|
||||
const member = interaction.options.getMember("user") as GuildMember | null
|
||||
const reason = interaction.options.getString("reason") ?? "No reason provided."
|
||||
const messageDeletionDays = interaction.options.getNumber("messagedeletiondays") ?? 0
|
||||
const embedColor = Number(color.replace("#", "0x"))
|
||||
|
||||
if (!member) {
|
||||
await interaction.editReply("You must specify a user.")
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { SlashCommandBuilder } from "discord.js"
|
||||
import { Command } from "interfaces"
|
||||
import { color, devMessage } from "config/options"
|
||||
import { embedColor, devMessage } from "config/options"
|
||||
import os from "os"
|
||||
import { execSync } from "child_process"
|
||||
const { dependencies, devDependencies } = require("../../package.json")
|
||||
@@ -17,7 +17,6 @@ export = {
|
||||
.setDMPermission(false),
|
||||
|
||||
async execute(interaction, client) {
|
||||
const embedColor = Number(color.replace("#", "0x"))
|
||||
const castedDeps = dependencies as { [key: string]: string }
|
||||
const castedDevDeps = devDependencies as { [key: string]: string }
|
||||
let osInfo: string
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { SlashCommandBuilder } from "discord.js"
|
||||
import { bwfkdr, bwstars, bwwins, swstars, swkdr, duelswins, duelswlr } from "config/reqs"
|
||||
import { color, devMessage } from "config/options"
|
||||
import { embedColor, devMessage } from "config/options"
|
||||
import { hypixelLevel, bedwarsLevel, skywarsLevel, getUUID, getPlayer, getGuild, getHeadURL } from "utils/Hypixel"
|
||||
import { Command } from "interfaces"
|
||||
|
||||
@@ -27,7 +27,6 @@ export = {
|
||||
await interaction.deferReply({})
|
||||
|
||||
const ign = interaction.options.getString("ign")!
|
||||
const embedColor = Number(color.replace("#", "0x"))
|
||||
|
||||
await interaction.editReply({
|
||||
embeds: [{
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { SlashCommandBuilder, PermissionFlagsBits, TextChannel, channelMention, userMention } from "discord.js"
|
||||
import { color } from "config/options"
|
||||
import { embedColor } from "config/options"
|
||||
import { Command } from "interfaces"
|
||||
import logToChannel from "utils/functions/logtochannel"
|
||||
|
||||
@@ -26,7 +26,6 @@ export = {
|
||||
|
||||
const amount = interaction.options.getInteger("amount")!
|
||||
const channel = interaction.channel as TextChannel
|
||||
const embedColor = Number(color.replace("#", "0x"))
|
||||
|
||||
if (amount < 1 || amount > 100) {
|
||||
await interaction.editReply({
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { SlashCommandBuilder, PermissionFlagsBits } from "discord.js"
|
||||
import { color } from "config/options"
|
||||
import { embedColor } from "config/options"
|
||||
import settings from "schemas/settingsSchema"
|
||||
import mongoose from "mongoose"
|
||||
import { Command } from "interfaces"
|
||||
@@ -37,7 +37,6 @@ export = {
|
||||
|
||||
const setting = interaction.options.getString("setting")
|
||||
const value = interaction.options.getString("value")
|
||||
const embedColor = Number(color.replace("#", "0x"))
|
||||
const settingsData = await settings.findOne({ name: setting })
|
||||
|
||||
if (!settingsData) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { ChannelType, PermissionFlagsBits, SlashCommandBuilder } from "discord.js"
|
||||
import { color, devMessage } from "config/options"
|
||||
import { embedColor, devMessage } from "config/options"
|
||||
import { Command } from "interfaces"
|
||||
import setup from "./counting/setup"
|
||||
import ban from "./counting/ban"
|
||||
@@ -54,7 +54,6 @@ export = {
|
||||
|
||||
async execute(interaction) {
|
||||
const subcommand = interaction.options.getSubcommand()
|
||||
const embedColor = Number(color.replace("#", "0x"))
|
||||
|
||||
if (subcommand === "setup") {
|
||||
setup(interaction)
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
import { ChatInputCommandInteraction, GuildMember, userMention } from "discord.js"
|
||||
import { countingBanned } from "config/roles"
|
||||
import { color, devMessage } from "config/options"
|
||||
import { embedColor, devMessage } from "config/options"
|
||||
|
||||
export default async function ban(interaction: ChatInputCommandInteraction): Promise<void> {
|
||||
const member = interaction.options.getMember("user")! as GuildMember
|
||||
const embedColor = Number(color.replace("#", "0x"))
|
||||
|
||||
if (member.roles.cache.has(countingBanned)) {
|
||||
await interaction.reply({
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
import { ChatInputCommandInteraction, TextChannel, channelMention } from "discord.js"
|
||||
import settingsSchema from "schemas/settingsSchema"
|
||||
import { color, devMessage } from "config/options"
|
||||
import { embedColor, devMessage } from "config/options"
|
||||
import mongoose from "mongoose"
|
||||
|
||||
export default async function setup(interaction: ChatInputCommandInteraction): Promise<void> {
|
||||
await interaction.deferReply()
|
||||
|
||||
const channel = interaction.options.getChannel("channel") as TextChannel
|
||||
const embedColor = Number(color.replace("#", "0x"))
|
||||
|
||||
if (await settingsSchema.findOne({ name: "counting" })) {
|
||||
await settingsSchema.findOneAndUpdate(
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
import { ChatInputCommandInteraction, GuildMember, userMention } from "discord.js"
|
||||
import { countingBanned } from "config/roles"
|
||||
import { color, devMessage } from "config/options"
|
||||
import { embedColor, devMessage } from "config/options"
|
||||
|
||||
export default async function ban(interaction: ChatInputCommandInteraction): Promise<void> {
|
||||
const member = interaction.options.getMember("user")! as GuildMember
|
||||
const embedColor = Number(color.replace("#", "0x"))
|
||||
|
||||
if (!member.roles.cache.has(countingBanned)) {
|
||||
await interaction.reply({
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { SlashCommandBuilder, PermissionFlagsBits, userMention, GuildMember } from "discord.js"
|
||||
import { color, devMessage } from "config/options"
|
||||
import { embedColor, devMessage } from "config/options"
|
||||
import verify from "schemas/verifySchema"
|
||||
import { Command } from "interfaces"
|
||||
import roleManage from "utils/functions/rolesmanage"
|
||||
@@ -26,7 +26,6 @@ export = {
|
||||
|
||||
async execute(interaction) {
|
||||
const member = interaction.options.getMember("user") as GuildMember
|
||||
const embedColor = Number(color.replace("#", "0x"))
|
||||
const verifiedUser = await verify.findOne({ userID: member.user.id })
|
||||
const mod = interaction.user
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { SlashCommandBuilder, PermissionFlagsBits, userMention, GuildMember } from "discord.js"
|
||||
import { getGuild, getHeadURL, getIGN } from "utils/Hypixel"
|
||||
import { hypixelGuildID, color, devMessage } from "config/options"
|
||||
import { hypixelGuildID, embedColor, devMessage } from "config/options"
|
||||
import verify from "schemas/verifySchema"
|
||||
import { Command } from "interfaces"
|
||||
import roleManage from "utils/functions/rolesmanage"
|
||||
@@ -29,7 +29,6 @@ export = {
|
||||
const user = interaction.options.getMember("user") as GuildMember
|
||||
const usermentioned = userMention(user.user.id)
|
||||
const verifyData = await verify.findOne({ userID: user.user.id })
|
||||
const embedColor = Number(color.replace("#", "0x"))
|
||||
|
||||
if (!verifyData) {
|
||||
await interaction.editReply({
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { SlashCommandBuilder, PermissionFlagsBits, GuildMember, userMention } from "discord.js"
|
||||
import { getUUID, getPlayer, getGuild, getHeadURL } from "utils/Hypixel"
|
||||
import { color, hypixelGuildID, devMessage } from "config/options"
|
||||
import { embedColor, hypixelGuildID, devMessage } from "config/options"
|
||||
import verify from "schemas/verifySchema"
|
||||
import mongoose from "mongoose"
|
||||
import roleManage from "utils/functions/rolesmanage"
|
||||
@@ -35,7 +35,6 @@ export = {
|
||||
const user = interaction.options.getMember("user") as GuildMember
|
||||
const ign = interaction.options.getString("ign")
|
||||
const mod = interaction.user
|
||||
const embedColor = Number(color.replace("#", "0x"))
|
||||
|
||||
const verifyData = await verify.findOne({ userID: user.user.id })
|
||||
if (verifyData) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { SlashCommandBuilder } from "discord.js"
|
||||
import { color, devMessage } from "config/options"
|
||||
import { embedColor, devMessage } from "config/options"
|
||||
import { Command } from "interfaces"
|
||||
import guildMember from "./guild/member"
|
||||
import guildInfo from "./guild/info"
|
||||
@@ -79,7 +79,6 @@ export = {
|
||||
|
||||
async execute(interaction) {
|
||||
const subcommand = interaction.options.getSubcommand()
|
||||
const embedColor = Number(color.replace("#", "0x"))
|
||||
|
||||
if (subcommand === "member") {
|
||||
await guildMember(interaction)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { getUUID, getIGN, getPlayer, getGuild, guildLevel } from "utils/Hypixel"
|
||||
import { color, devMessage } from "config/options"
|
||||
import { embedColor, devMessage } from "config/options"
|
||||
import { ChatInputCommandInteraction } from "discord.js"
|
||||
import { GuildData } from "interfaces"
|
||||
|
||||
@@ -8,7 +8,6 @@ export default async function guildInfo(interaction: ChatInputCommandInteraction
|
||||
|
||||
const query = interaction.options.getString("query")!
|
||||
const type = interaction.options.getString("type") || "ign"
|
||||
const embedColor = Number(color.replace("#", "0x"))
|
||||
let guild: GuildData | null
|
||||
|
||||
if (type === "ign") {
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
import { getUUID, getPlayer, getGuild, getHeadURL } from "utils/Hypixel"
|
||||
import { color, devMessage } from "config/options"
|
||||
import { embedColor, devMessage } from "config/options"
|
||||
import { ChatInputCommandInteraction } from "discord.js"
|
||||
|
||||
export default async function guildMember(interaction: ChatInputCommandInteraction): Promise<void> {
|
||||
await interaction.deferReply()
|
||||
|
||||
const ign = interaction.options.getString("ign")!
|
||||
const embedColor = Number(color.replace("#", "0x"))
|
||||
|
||||
await interaction.editReply({
|
||||
embeds: [{
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { getUUID, getPlayer, getGuild, getIGN } from "utils/Hypixel"
|
||||
import { color, devMessage } from "config/options"
|
||||
import { embedColor, devMessage } from "config/options"
|
||||
import { ChannelType, ChatInputCommandInteraction } from "discord.js"
|
||||
import { GuildData } from "interfaces"
|
||||
import { redis } from "utils/Illegitimate"
|
||||
@@ -10,7 +10,6 @@ export default async function guildTop(interaction: ChatInputCommandInteraction)
|
||||
const query = interaction.options.getString("query")!
|
||||
const type = interaction.options.getString("type") || "ign"
|
||||
let amount = interaction.options.getNumber("amount") || 10
|
||||
const embedColor = Number(color.replace("#", "0x"))
|
||||
let guild: GuildData | null
|
||||
|
||||
if (interaction.channel!.type === ChannelType.DM) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { SlashCommandBuilder } from "discord.js"
|
||||
import { color, devMessage } from "config/options"
|
||||
import { embedColor, devMessage } from "config/options"
|
||||
import { Command } from "interfaces"
|
||||
|
||||
export = {
|
||||
@@ -55,8 +55,6 @@ export = {
|
||||
}
|
||||
}
|
||||
|
||||
const embedColor = Number(color.replace("#", "0x"))
|
||||
|
||||
await interaction.editReply({
|
||||
embeds: [{
|
||||
title: "Commands",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { SlashCommandBuilder, PermissionFlagsBits } from "discord.js"
|
||||
import { color, devMessage, instructionsgif } from "config/options"
|
||||
import { embedColor, devMessage, instructionsgif } from "config/options"
|
||||
import { Command } from "interfaces"
|
||||
|
||||
export = {
|
||||
@@ -15,8 +15,6 @@ export = {
|
||||
.setDMPermission(false),
|
||||
|
||||
async execute(interaction) {
|
||||
const embedColor = Number(color.replace("#", "0x"))
|
||||
|
||||
await interaction.reply({
|
||||
embeds: [{
|
||||
title: "Verification",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { SlashCommandBuilder, PermissionFlagsBits, userMention, GuildMember } from "discord.js"
|
||||
import { admin, helper } from "config/roles"
|
||||
import { color, devMessage } from "config/options"
|
||||
import { embedColor, devMessage } from "config/options"
|
||||
import { Command } from "interfaces"
|
||||
import logToChannel from "utils/functions/logtochannel"
|
||||
|
||||
@@ -32,8 +32,6 @@ export = {
|
||||
|
||||
const member = interaction.options.getMember("member") as GuildMember
|
||||
const reason = interaction.options.getString("reason") ?? "No reason provided."
|
||||
const embedColor = Number(color.replace("#", "0x"))
|
||||
|
||||
const mod = await interaction.guild!.members.fetch(interaction.user.id)
|
||||
const memberRoles = member.roles.cache.map(role => role.id)
|
||||
const modRoles = mod.roles.cache.map(role => role.id)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { SlashCommandBuilder } from "discord.js"
|
||||
import { color, devMessage } from "config/options"
|
||||
import { embedColor, devMessage } from "config/options"
|
||||
import { Command } from "interfaces"
|
||||
|
||||
export = {
|
||||
@@ -15,9 +15,6 @@ export = {
|
||||
|
||||
async execute(interaction, client) {
|
||||
await interaction.deferReply()
|
||||
|
||||
const embedColor = Number(color.replace("#", "0x"))
|
||||
|
||||
await interaction.editReply({
|
||||
embeds: [{
|
||||
description: "Ping of the bot is " + client.ws.ping + "ms.",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { SlashCommandBuilder, User } from "discord.js"
|
||||
import { color } from "config/options"
|
||||
import { embedColor } from "config/options"
|
||||
import { Command } from "interfaces"
|
||||
import env from "utils/Env"
|
||||
|
||||
@@ -22,7 +22,6 @@ export = {
|
||||
|
||||
async execute(interaction) {
|
||||
const user = (interaction.options.getUser("user") || interaction.user) as User
|
||||
const embedColor = Number(color.replace("#", "0x"))
|
||||
let size: number
|
||||
|
||||
if (user.id === env.prod.dev) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { SlashCommandBuilder, PermissionFlagsBits, userMention } from "discord.js"
|
||||
import { color, devMessage } from "config/options"
|
||||
import { embedColor, devMessage } from "config/options"
|
||||
import waitinglistSchema from "schemas/waitinglistSchema"
|
||||
import { Command } from "interfaces"
|
||||
import logToChannel from "utils/functions/logtochannel"
|
||||
@@ -34,8 +34,6 @@ export = {
|
||||
const user = interaction.options.getUser("user")!
|
||||
const reason = interaction.options.getString("reason") ?? "No reason provided."
|
||||
const mod = interaction.user!
|
||||
const embedColor = Number(color.replace("#", "0x"))
|
||||
|
||||
const waitinglist = await waitinglistSchema.findOne({ userID: user.id })
|
||||
|
||||
if (!waitinglist) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { SlashCommandBuilder } from "discord.js"
|
||||
import { color, devMessage } from "config/options"
|
||||
import { embedColor, devMessage } from "config/options"
|
||||
import { bwfkdr, bwstars, bwwins, swstars, swkdr, duelswins, duelswlr } from "config/reqs"
|
||||
import { Command } from "interfaces"
|
||||
|
||||
@@ -15,8 +15,6 @@ export = {
|
||||
.setDMPermission(false),
|
||||
|
||||
async execute(interaction) {
|
||||
const embedColor = Number(color.replace("#", "0x"))
|
||||
|
||||
await interaction.reply({
|
||||
embeds: [{
|
||||
title: "Requirements",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { SlashCommandBuilder, PermissionFlagsBits, ChannelType, TextChannel } from "discord.js"
|
||||
import { color, devMessage } from "config/options"
|
||||
import { embedColor, devMessage } from "config/options"
|
||||
import { Command } from "interfaces"
|
||||
|
||||
export = {
|
||||
@@ -31,7 +31,6 @@ export = {
|
||||
|
||||
const message = interaction.options.getString("message")!
|
||||
const channel = (interaction.options.getChannel("channel") || interaction.channel) as TextChannel
|
||||
const embedColor = Number(color.replace("#", "0x"))
|
||||
|
||||
channel.send({
|
||||
embeds: [{
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { SlashCommandBuilder, PermissionFlagsBits, userMention, GuildMember } from "discord.js"
|
||||
import { color, devMessage } from "config/options"
|
||||
import { embedColor, devMessage } from "config/options"
|
||||
import { Command } from "interfaces"
|
||||
import logToChannel from "utils/functions/logtochannel"
|
||||
|
||||
@@ -30,7 +30,6 @@ export = {
|
||||
async execute(interaction) {
|
||||
const member = interaction.options.getMember("user") as GuildMember
|
||||
const nickname = interaction.options.getString("nickname")
|
||||
const embedColor = Number(color.replace("#", "0x"))
|
||||
|
||||
if (!member.manageable) {
|
||||
interaction.reply({
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { SlashCommandBuilder, PermissionFlagsBits, ButtonBuilder, ActionRowBuilder, ButtonStyle, ChannelType, TextChannel } from "discord.js"
|
||||
import { color, devMessage } from "config/options"
|
||||
import { embedColor, devMessage } from "config/options"
|
||||
import { Command } from "interfaces"
|
||||
|
||||
export = {
|
||||
@@ -78,7 +78,6 @@ export = {
|
||||
async execute(interaction) {
|
||||
const subcommand = interaction.options.getSubcommand()
|
||||
const channel = interaction.options.getChannel("channel") as TextChannel
|
||||
const embedColor = Number(color.replace("#", "0x"))
|
||||
let title = ""
|
||||
let description = ""
|
||||
let customId = ""
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { SlashCommandBuilder, PermissionFlagsBits, ChannelType, TextChannel, channelMention, userMention } from "discord.js"
|
||||
import { color, devMessage } from "config/options"
|
||||
import { embedColor, devMessage } from "config/options"
|
||||
import { Command } from "interfaces"
|
||||
import logToChannel from "utils/functions/logtochannel"
|
||||
|
||||
@@ -31,7 +31,6 @@ export = {
|
||||
|
||||
const seconds = interaction.options.getInteger("seconds") ?? 5
|
||||
const channel = (interaction.options.getChannel("channel") || interaction.channel) as TextChannel
|
||||
const embedColor = Number(color.replace("#", "0x"))
|
||||
|
||||
if (seconds > 21600) {
|
||||
await channel.setRateLimitPerUser(21600)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { GuildMember, SlashCommandBuilder } from "discord.js"
|
||||
import snipeCacheSchema from "schemas/snipeCacheSchema"
|
||||
import { Command } from "interfaces"
|
||||
import { color } from "config/options"
|
||||
import { embedColor } from "config/options"
|
||||
import { SnipeCache } from "typings"
|
||||
|
||||
export = {
|
||||
@@ -28,7 +28,6 @@ export = {
|
||||
userid: member.user.id,
|
||||
channelid: interaction.channel!.id
|
||||
})
|
||||
const embedColor = Number(color.replace("#", "0x"))
|
||||
const messages: string[] = []
|
||||
|
||||
if (!snipeCache.length) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { SlashCommandBuilder, PermissionFlagsBits } from "discord.js"
|
||||
import { color, devMessage } from "config/options"
|
||||
import { embedColor, devMessage } from "config/options"
|
||||
import { Command } from "interfaces"
|
||||
import help from "./staff/help"
|
||||
import beast from "./staff/beast"
|
||||
@@ -47,7 +47,6 @@ export = {
|
||||
|
||||
async execute(interaction, client) {
|
||||
const subcommand = interaction.options.getSubcommand()
|
||||
const embedColor = Number(color.replace("#", "0x"))
|
||||
|
||||
if (subcommand === "help") {
|
||||
help(interaction, client)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { bwwins, beastbwfkdr, beastbwstars, beastswkdr, beastswstars, beastduelswins, duelswlr } from "config/reqs"
|
||||
import { color, devMessage } from "config/options"
|
||||
import { embedColor, devMessage } from "config/options"
|
||||
import { hypixelLevel, bedwarsLevel, skywarsLevel, getUUID, getPlayer, getGuild, getHeadURL } from "utils/Hypixel"
|
||||
import { ChatInputCommandInteraction } from "discord.js"
|
||||
|
||||
@@ -7,7 +7,6 @@ export default async function beast(interaction: ChatInputCommandInteraction): P
|
||||
await interaction.deferReply()
|
||||
|
||||
const ign = interaction.options.getString("ign")!
|
||||
const embedColor = Number(color.replace("#", "0x"))
|
||||
|
||||
if (!ign) {
|
||||
await interaction.editReply("Please provide a player's IGN.")
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { ChatInputCommandInteraction } from "discord.js"
|
||||
import { color, devMessage } from "config/options"
|
||||
import { embedColor, devMessage } from "config/options"
|
||||
import { ExtendedClient as Client } from "utils/Client"
|
||||
|
||||
export default async function help(interaction: ChatInputCommandInteraction, client: Client): Promise<void> {
|
||||
@@ -42,8 +42,6 @@ export default async function help(interaction: ChatInputCommandInteraction, cli
|
||||
}
|
||||
}
|
||||
|
||||
const embedColor = Number(color.replace("#", "0x"))
|
||||
|
||||
await interaction.editReply({
|
||||
embeds: [{
|
||||
title: "Commands",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { ActionRowBuilder, ButtonBuilder, ButtonStyle, ChatInputCommandInteraction } from "discord.js"
|
||||
import { color, devMessage } from "config/options"
|
||||
import { embedColor, devMessage } from "config/options"
|
||||
import env from "utils/Env"
|
||||
|
||||
export default async function prune(interaction: ChatInputCommandInteraction): Promise<void> {
|
||||
@@ -10,7 +10,6 @@ export default async function prune(interaction: ChatInputCommandInteraction): P
|
||||
return
|
||||
}
|
||||
|
||||
const embedColor = Number(color.replace("#", "0x"))
|
||||
const members = await interaction.guild!.members.fetch()
|
||||
|
||||
await interaction.editReply({
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import verify from "schemas/verifySchema"
|
||||
import { color, hypixelGuildID } from "config/options"
|
||||
import { embedColor, hypixelGuildID } from "config/options"
|
||||
import colorLog from "utils/functions/colors"
|
||||
import { verifyTick } from "config/roles"
|
||||
import roleManage from "utils/functions/rolesmanage"
|
||||
@@ -9,10 +9,10 @@ import { getGuild } from "utils/Hypixel"
|
||||
import { GuildData } from "interfaces"
|
||||
|
||||
export default async function updateDiscordRoles(interaction: ChatInputCommandInteraction): Promise<void> {
|
||||
const discordMember = interaction.member as GuildMember
|
||||
const embedColor = Number(color.replace("#", "0x"))
|
||||
await interaction.deferReply()
|
||||
|
||||
const discordMember = interaction.member as GuildMember
|
||||
|
||||
if (discordMember.user.id !== env.prod.dev) {
|
||||
await interaction.editReply({
|
||||
embeds: [{
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { SlashCommandBuilder, PermissionFlagsBits, userMention, ChatInputCommandInteraction, GuildMember } from "discord.js"
|
||||
import { color, devMessage } from "config/options"
|
||||
import { embedColor, devMessage } from "config/options"
|
||||
import { Command } from "interfaces"
|
||||
import ms from "ms"
|
||||
import logToChannel from "utils/functions/logtochannel"
|
||||
@@ -40,7 +40,6 @@ export = {
|
||||
const timeString = interaction.options.getString("time")!
|
||||
const reason = interaction.options.getString("reason") || "No reason provided"
|
||||
const mod = interaction.member! as GuildMember
|
||||
const embedColor = Number(color.replace("#", "0x"))
|
||||
const time = ms(timeString)
|
||||
const { default: prettyMs } = await import("pretty-ms")
|
||||
const prettyTime = prettyMs(time, { verbose: true })
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { SlashCommandBuilder, PermissionFlagsBits, userMention, User } from "discord.js"
|
||||
import { color, devMessage } from "config/options"
|
||||
import { embedColor, devMessage } from "config/options"
|
||||
import { Command } from "interfaces"
|
||||
import logToChannel from "utils/functions/logtochannel"
|
||||
|
||||
@@ -34,7 +34,6 @@ export = {
|
||||
const userid = interaction.options.getString("user")!
|
||||
const reason = interaction.options.getString("reason") || "No reason provided"
|
||||
const mod = interaction.user
|
||||
const embedColor = Number(color.replace("#", "0x"))
|
||||
let user: User
|
||||
|
||||
if (userid === "none") {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { GuildMember, SlashCommandBuilder } from "discord.js"
|
||||
import { getGuild, getIGN, getHeadURL } from "utils/Hypixel"
|
||||
import verify from "schemas/verifySchema"
|
||||
import { color, hypixelGuildID, devMessage } from "config/options"
|
||||
import { embedColor, hypixelGuildID, devMessage } from "config/options"
|
||||
import roleManage from "utils/functions/rolesmanage"
|
||||
import { Command } from "interfaces"
|
||||
|
||||
@@ -21,7 +21,6 @@ export = {
|
||||
|
||||
const user = interaction.member as GuildMember
|
||||
const verifyData = await verify.findOne({ userID: user.user.id })
|
||||
const embedColor = Number(color.replace("#", "0x"))
|
||||
|
||||
if (!verifyData) {
|
||||
await interaction.editReply({
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { SlashCommandBuilder } from "discord.js"
|
||||
import { color, devMessage } from "config/options"
|
||||
import { embedColor, devMessage } from "config/options"
|
||||
import { getUUID, getIGN, getHeadURL, formatUuid } from "utils/Hypixel"
|
||||
import { Command } from "interfaces"
|
||||
|
||||
@@ -30,7 +30,6 @@ export = {
|
||||
const formattedUuid = formatUuid(uuid)
|
||||
const newIgn = (await getIGN(uuid)) as string
|
||||
const head = await getHeadURL(ign)
|
||||
const embedColor = Number(color.replace("#", "0x"))
|
||||
|
||||
if (!uuid) {
|
||||
interaction.editReply({
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { GuildMember, SlashCommandBuilder } from "discord.js"
|
||||
import { getUUID, getPlayer, getGuild, getHeadURL } from "utils/Hypixel"
|
||||
import { color, hypixelGuildID, devMessage } from "config/options"
|
||||
import { embedColor, hypixelGuildID, devMessage } from "config/options"
|
||||
import mongoose from "mongoose"
|
||||
import roleManage from "utils/functions/rolesmanage"
|
||||
import { Command } from "interfaces"
|
||||
@@ -32,7 +32,6 @@ export = {
|
||||
|
||||
const user = interaction.member! as GuildMember
|
||||
const ign = interaction.options.getString("ign")!
|
||||
const embedColor = Number(color.replace("#", "0x"))
|
||||
|
||||
const verifyData = await verify.findOne({ userID: user.id })
|
||||
if (verifyData) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { SlashCommandBuilder, userMention } from "discord.js"
|
||||
import { Command } from "interfaces"
|
||||
import { color, devMessage } from "config/options"
|
||||
import { embedColor, devMessage } from "config/options"
|
||||
import verify from "schemas/verifySchema"
|
||||
import { getIGN, getHeadURL } from "utils/Hypixel"
|
||||
|
||||
@@ -20,7 +20,6 @@ export = {
|
||||
|
||||
const user = interaction.user
|
||||
const verifyData = await verify.findOne({ userID: user.id })
|
||||
const embedColor = Number(color.replace("#", "0x"))
|
||||
|
||||
if (!verifyData) {
|
||||
await interaction.editReply({
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { SlashCommandBuilder, PermissionFlagsBits, userMention } from "discord.js"
|
||||
import { getIGN, getHeadURL } from "utils/Hypixel"
|
||||
import { color, devMessage } from "config/options"
|
||||
import { embedColor, devMessage } from "config/options"
|
||||
import verify from "schemas/verifySchema"
|
||||
import { Command } from "interfaces"
|
||||
|
||||
@@ -26,8 +26,6 @@ export = {
|
||||
await interaction.deferReply()
|
||||
|
||||
const user = interaction.options.getUser("user")!
|
||||
const embedColor = Number(color.replace("#", "0x"))
|
||||
|
||||
const verifiedUser = await verify.findOne({ userID: user.id })
|
||||
if (!verifiedUser) {
|
||||
interaction.editReply("You are not verified!")
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { color, devMessage } from "config/options"
|
||||
import { embedColor, devMessage } from "config/options"
|
||||
import guildapp from "schemas/guildAppSchema"
|
||||
import { bwfkdr, bwstars, bwwins, swstars, swkdr, duelswins, duelswlr } from "config/reqs"
|
||||
import { hypixelLevel, bedwarsLevel, skywarsLevel, getPlayer, getGuild, getHeadURL } from "utils/Hypixel"
|
||||
@@ -16,7 +16,6 @@ export = {
|
||||
const applicantId = embed.footer!.text.split(" ")[1]
|
||||
const guildappdata = await guildapp.findOne({ userID: applicantId })
|
||||
const uuid = guildappdata!.uuid
|
||||
const embedColor = Number(color.replace("#", "0x"))
|
||||
|
||||
const player = await getPlayer(uuid)
|
||||
if (!player) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { ActionRowBuilder, ButtonStyle, ButtonBuilder, TextChannel } from "discord.js"
|
||||
import { color, waitingListChannel, waitingListMessage, hypixelGuildID } from "config/options"
|
||||
import { embedColor, waitingListChannel, waitingListMessage, hypixelGuildID } from "config/options"
|
||||
import colorLog from "utils/functions/colors"
|
||||
import mongoose from "mongoose"
|
||||
import guildapp from "schemas/guildAppSchema"
|
||||
@@ -17,8 +17,6 @@ export = {
|
||||
|
||||
const user = interaction.user
|
||||
const guild = interaction.guild!
|
||||
const embedColor = Number(color.replace("#", "0x"))
|
||||
|
||||
const message = interaction.message
|
||||
const embed = message.embeds[0]
|
||||
const applicantId = embed.footer!.text.split(" ")[1]
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import { ButtonBuilder, ButtonStyle, ActionRowBuilder, EmbedBuilder, GuildMember, TextChannel } from "discord.js"
|
||||
import { color } from "config/options"
|
||||
import { embedColor, applicationsChannel } from "config/options"
|
||||
import { largeM, smallM, ignM } from "config/limitmessages"
|
||||
import { applicationsChannel } from "config/options"
|
||||
import questions from "config/questions"
|
||||
import { guildRole } from "config/roles"
|
||||
import { getUUID } from "utils/Hypixel"
|
||||
@@ -17,7 +16,6 @@ export = {
|
||||
await interaction.deferReply({ ephemeral: true })
|
||||
const user = interaction.member as GuildMember
|
||||
const guild = interaction.guild!
|
||||
const embedColor = Number(color.replace("#", "0x"))
|
||||
const userRoles = user.roles.cache.map(role => role.id)
|
||||
const guildQuestions = questions.guild
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import { ButtonBuilder, ActionRowBuilder, ButtonStyle, EmbedBuilder, GuildMember
|
||||
import { gm, manager, moderator, beast, member, guildStaff, guildRole } from "config/roles"
|
||||
import { ignM, smallM, largeM } from "config/limitmessages"
|
||||
import { inactivity } from "config/questions"
|
||||
import { color, inactivityLogChannel } from "config/options"
|
||||
import { embedColor, inactivityLogChannel } from "config/options"
|
||||
import { Button } from "interfaces"
|
||||
import { getIGN } from "utils/Hypixel"
|
||||
const guildRoles = [gm, manager, moderator, beast, member, guildStaff, guildRole]
|
||||
@@ -14,7 +14,6 @@ export = {
|
||||
async execute(interaction) {
|
||||
const guild = interaction.guild!
|
||||
const user = interaction.member as GuildMember
|
||||
const embedColor = Number(color.replace("#", "0x"))
|
||||
const userRoles = user.roles.cache
|
||||
|
||||
if (!userRoles.some(role => guildRoles.includes(role.id))) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { ActionRowBuilder, ButtonBuilder, ButtonStyle } from "discord.js"
|
||||
import { color } from "config/options"
|
||||
import { embedColor } from "config/options"
|
||||
import staffapp from "schemas/staffAppSchema"
|
||||
import { Button } from "interfaces"
|
||||
|
||||
@@ -12,8 +12,6 @@ export = {
|
||||
|
||||
const user = interaction.user
|
||||
const guild = interaction.guild!
|
||||
const embedColor = Number(color.replace("#", "0x"))
|
||||
|
||||
const message = interaction.message
|
||||
const embed = message.embeds[0]
|
||||
const applicantId = embed.footer!.text.split(" ")[1]
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { ButtonBuilder, ButtonStyle, ActionRowBuilder, EmbedBuilder, GuildMember, TextChannel } from "discord.js"
|
||||
import { color, staffApplicationsChannel } from "config/options"
|
||||
import { embedColor, staffApplicationsChannel } from "config/options"
|
||||
import { largeM, ignM } from "config/limitmessages"
|
||||
import questions from "config/questions"
|
||||
import { guildRole, guildStaff } from "config/roles"
|
||||
@@ -17,7 +17,6 @@ export = {
|
||||
async execute(interaction) {
|
||||
const user = interaction.member as GuildMember
|
||||
const guild = interaction.guild!
|
||||
const embedColor = Number(color.replace("#", "0x"))
|
||||
const userRoles = user.roles.cache
|
||||
const setting = await settings.findOne({ name: "staffAppStatus" })
|
||||
const status = setting!.value || "0"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { EmbedBuilder, ActionRowBuilder, ButtonBuilder, ButtonStyle, Message, GuildMember } from "discord.js"
|
||||
import { color } from "config/options"
|
||||
import { embedColor } from "config/options"
|
||||
import guildapp from "schemas/guildAppSchema"
|
||||
import { Modal } from "interfaces"
|
||||
|
||||
@@ -14,9 +14,7 @@ export = {
|
||||
const message = interaction.message as Message
|
||||
const embed = message.embeds[0]
|
||||
const applicantId = embed.footer!.text.split(" ")[1]
|
||||
|
||||
const reason = interaction.fields.fields.get("denyreason")!.value || "No reason provided"
|
||||
const embedColor = Number(color.replace("#", "0x"))
|
||||
|
||||
await message.edit({
|
||||
components: [
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { EmbedBuilder, ActionRowBuilder, ButtonBuilder, ButtonStyle } from "discord.js"
|
||||
import { color } from "config/options"
|
||||
import { embedColor } from "config/options"
|
||||
import staffapp from "schemas/staffAppSchema"
|
||||
import { Modal } from "interfaces"
|
||||
|
||||
@@ -12,8 +12,6 @@ export = {
|
||||
|
||||
const guild = interaction.guild
|
||||
const reason = interaction.fields.fields.get("staffdenyreason")!.value || "No reason provided"
|
||||
const embedColor = Number(color.replace("#", "0x"))
|
||||
|
||||
const message = interaction.message!
|
||||
const embed = message.embeds[0]
|
||||
const applicantId = embed.footer!.text.split(" ")[1]
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { getUUID, getPlayer, getGuild, getHeadURL } from "utils/Hypixel"
|
||||
import { color, hypixelGuildID, devMessage } from "config/options"
|
||||
import { embedColor, hypixelGuildID, devMessage } from "config/options"
|
||||
import verify from "schemas/verifySchema"
|
||||
import mongoose from "mongoose"
|
||||
import { gm, manager, moderator, beast, elite, member, guildRole, guildStaff, defaultMember } from "config/roles"
|
||||
@@ -15,8 +15,6 @@ export = {
|
||||
|
||||
const user = interaction.member as GuildMember
|
||||
const ign = interaction.fields.fields.get("verifyign")!.value
|
||||
const embedColor = Number(color.replace("#", "0x"))
|
||||
|
||||
const verifyData = await verify.findOne({ userID: user.user.id })
|
||||
if (verifyData) {
|
||||
interaction.editReply("You are already verified.\n" + "Try running /update to update your roles.")
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
const options = {
|
||||
color: "#eeaadb",
|
||||
embedColor: 0xeeaadb,
|
||||
guildid: "481741000365178881",
|
||||
devMessage: "Developed by taken.lua",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { hypixelGuildID, guildLogChannel, color, devMessage } from "config/options"
|
||||
import { hypixelGuildID, guildLogChannel, embedColor, devMessage } from "config/options"
|
||||
import colorLog from "utils/functions/colors"
|
||||
import { getGuild, getIGN } from "utils/Hypixel"
|
||||
import { Cron, GuildData } from "interfaces"
|
||||
@@ -13,8 +13,6 @@ async function guildWeekly() {
|
||||
return
|
||||
}
|
||||
|
||||
const embedColor = Number(color.replace("#", "0x"))
|
||||
|
||||
const message = await channel.send({
|
||||
embeds: [{
|
||||
description: "Starting to fetch guild data...",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { GuildMember, userMention } from "discord.js"
|
||||
import { color } from "config/options"
|
||||
import { embedColor } from "config/options"
|
||||
import { Event } from "interfaces"
|
||||
import logToChannel from "utils/functions/logtochannel"
|
||||
|
||||
@@ -10,8 +10,6 @@ export = {
|
||||
|
||||
execute(member: GuildMember) {
|
||||
if (process.env.NODE_ENV === "dev") return
|
||||
const embedColor = Number(color.replace("#", "0x"))
|
||||
|
||||
logToChannel("bot", {
|
||||
embeds: [{
|
||||
title: "New Member",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import logToChannel from "utils/functions/logtochannel"
|
||||
import { Event } from "interfaces"
|
||||
import { color } from "config/options"
|
||||
import { embedColor } from "config/options"
|
||||
|
||||
export = {
|
||||
name: "sendonlinemessage",
|
||||
@@ -10,8 +10,6 @@ export = {
|
||||
execute() {
|
||||
if (process.env.NODE_ENV === "dev") return
|
||||
|
||||
const embedColor = Number(color.replace("#", "0x"))
|
||||
|
||||
logToChannel("online", {
|
||||
embeds: [{
|
||||
description: "Bot is online!",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { userMention, channelMention, VoiceState } from "discord.js"
|
||||
import { color } from "config/options"
|
||||
import { embedColor } from "config/options"
|
||||
import { Event } from "interfaces"
|
||||
import logToChannel from "utils/functions/logtochannel"
|
||||
|
||||
@@ -11,7 +11,6 @@ export = {
|
||||
execute(oldState: VoiceState, newState: VoiceState) {
|
||||
if (process.env.NODE_ENV === "dev") return
|
||||
|
||||
const embedColor = Number(color.replace("#", "0x"))
|
||||
const oldChannel = oldState.channel
|
||||
const newChannel = newState.channel
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { ExtendedClient as Client } from "utils/Client"
|
||||
import { color } from "config/options"
|
||||
import { embedColor } from "config/options"
|
||||
import { Autocomplete } from "interfaces"
|
||||
import { Events } from "discord.js"
|
||||
import colorLog from "utils/functions/colors"
|
||||
@@ -7,7 +7,6 @@ import path from "path"
|
||||
import fs from "fs"
|
||||
import logToChannel from "utils/functions/logtochannel"
|
||||
type FileType = "js" | "ts"
|
||||
const embedColor = Number(color.replace("#", "0x"))
|
||||
|
||||
export default function loadAutocompleteEvents(client: Client, ft: FileType) {
|
||||
const autocompletePath = path.join(__dirname, "..", "..", "components", "autocomplete")
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
import { ExtendedClient as Client } from "utils/Client"
|
||||
import colorLog from "utils/functions/colors"
|
||||
import { color } from "config/options"
|
||||
import { embedColor } from "config/options"
|
||||
import { Button } from "interfaces"
|
||||
import { Events } from "discord.js"
|
||||
import path from "path"
|
||||
import fs from "fs"
|
||||
import logToChannel from "utils/functions/logtochannel"
|
||||
type FileType = "js" | "ts"
|
||||
const embedColor = Number(color.replace("#", "0x"))
|
||||
|
||||
export default function loadButtonEvents(client: Client, ft: FileType) {
|
||||
const btnPath = path.join(__dirname, "..", "..", "components", "buttons")
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
import { ExtendedClient as Client } from "utils/Client"
|
||||
import colorLog from "utils/functions/colors"
|
||||
import { color } from "config/options"
|
||||
import { embedColor } from "config/options"
|
||||
import { Command } from "interfaces"
|
||||
import { Events } from "discord.js"
|
||||
import path from "path"
|
||||
import fs from "fs"
|
||||
import logToChannel from "utils/functions/logtochannel"
|
||||
type FileType = "js" | "ts"
|
||||
const embedColor = Number(color.replace("#", "0x"))
|
||||
|
||||
export default function loadSlashCommandsEvents(client: Client, ft: FileType) {
|
||||
const cmdPath = path.join(__dirname, "..", "..", "commands")
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
import { ExtendedClient as Client } from "utils/Client"
|
||||
import colorLog from "utils/functions/colors"
|
||||
import { ContextMenu } from "interfaces"
|
||||
import { color } from "config/options"
|
||||
import { embedColor } from "config/options"
|
||||
import { Events } from "discord.js"
|
||||
import path from "path"
|
||||
import fs from "fs"
|
||||
import logToChannel from "utils/functions/logtochannel"
|
||||
type FileType = "js" | "ts"
|
||||
const embedColor = Number(color.replace("#", "0x"))
|
||||
|
||||
export default function loadContextMenuEvents(client: Client, ft: FileType) {
|
||||
const contextMenuPath = path.join(__dirname, "..", "..", "commands-contextmenu")
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
import { ExtendedClient as Client } from "utils/Client"
|
||||
import colorLog from "utils/functions/colors"
|
||||
import { color } from "config/options"
|
||||
import { embedColor } from "config/options"
|
||||
import { Modal } from "interfaces"
|
||||
import { Events } from "discord.js"
|
||||
import path from "path"
|
||||
import fs from "fs"
|
||||
import logToChannel from "utils/functions/logtochannel"
|
||||
type FileType = "js" | "ts"
|
||||
const embedColor = Number(color.replace("#", "0x"))
|
||||
|
||||
export default function loadModalEvents(client: Client, ft: FileType) {
|
||||
const modalPath = path.join(__dirname, "..", "..", "components", "modals")
|
||||
|
||||
Reference in New Issue
Block a user