Added dprint and formatted file to it
Signed-off-by: Taken <taken@mairimashita.org>
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import { RESTPostAPIChatInputApplicationCommandsJSONBody } from "discord.js"
|
||||
import fs from "fs"
|
||||
import { ICommand } from "interfaces"
|
||||
import { ExtendedClient } from "./Client.js"
|
||||
import env from "./Env.js"
|
||||
import { ICommand } from "interfaces"
|
||||
import { RESTPostAPIChatInputApplicationCommandsJSONBody } from "discord.js"
|
||||
import color from "./functions/colors.js"
|
||||
type FileType = "js" | "ts"
|
||||
|
||||
@@ -36,10 +36,10 @@ export default async function autoDeployCommands(fileType: FileType, client: Ext
|
||||
return {
|
||||
name: option.name,
|
||||
description: option.description,
|
||||
type: option.type,
|
||||
type: option.type
|
||||
}
|
||||
}),
|
||||
defaultPermission: command.default_member_permissions ?? null,
|
||||
defaultPermission: command.default_member_permissions ?? null
|
||||
}
|
||||
}).sort((a, b) => a.name > b.name ? 1 : -1)
|
||||
|
||||
@@ -56,10 +56,10 @@ export default async function autoDeployCommands(fileType: FileType, client: Ext
|
||||
return {
|
||||
name: option.name,
|
||||
description: option.description,
|
||||
type: option.type,
|
||||
type: option.type
|
||||
}
|
||||
}),
|
||||
defaultPermission: command.defaultMemberPermissions,
|
||||
defaultPermission: command.defaultMemberPermissions
|
||||
}
|
||||
}).sort((a, b) => a.name > b.name ? 1 : -1)
|
||||
|
||||
@@ -108,7 +108,6 @@ export default async function autoDeployCommands(fileType: FileType, client: Ext
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
console.log(color("-------------", "lavender"))
|
||||
console.log(color(nc, "lavender"))
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { Client, Collection, GatewayIntentBits, Partials } from "discord.js"
|
||||
import color from "./functions/colors.js"
|
||||
import { ICommand, IContextMenu, IButton, IModal, IAutocomplete } from "interfaces"
|
||||
import env from "./Env.js"
|
||||
import { IAutocomplete, IButton, ICommand, IContextMenu, IModal } from "interfaces"
|
||||
import autoDeployCommands from "./Autodeploy.js"
|
||||
import env from "./Env.js"
|
||||
import color from "./functions/colors.js"
|
||||
|
||||
export class ExtendedClient extends Client {
|
||||
commands: Collection<string, ICommand> = new Collection()
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { ExtendedClient as Client } from "utils/Client.js"
|
||||
import { embedColor } from "config/options.js"
|
||||
import { IAutocomplete } from "interfaces"
|
||||
import { Events } from "discord.js"
|
||||
import color from "utils/functions/colors.js"
|
||||
import path from "path"
|
||||
import fs from "fs"
|
||||
import { IAutocomplete } from "interfaces"
|
||||
import path from "path"
|
||||
import { ExtendedClient as Client } from "utils/Client.js"
|
||||
import color from "utils/functions/colors.js"
|
||||
import logToChannel from "utils/functions/logtochannel.js"
|
||||
type FileType = "js" | "ts"
|
||||
const __dirname = import.meta.dirname
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { embedColor } from "config/options.js"
|
||||
import { Events } from "discord.js"
|
||||
import fs from "fs"
|
||||
import { IButton } from "interfaces"
|
||||
import path from "path"
|
||||
import { ExtendedClient as Client } from "utils/Client.js"
|
||||
import color from "utils/functions/colors.js"
|
||||
import { embedColor } from "config/options.js"
|
||||
import { IButton } from "interfaces"
|
||||
import { Events } from "discord.js"
|
||||
import path from "path"
|
||||
import fs from "fs"
|
||||
import logToChannel from "utils/functions/logtochannel.js"
|
||||
type FileType = "js" | "ts"
|
||||
const __dirname = import.meta.dirname
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { embedColor } from "config/options.js"
|
||||
import { Events } from "discord.js"
|
||||
import fs from "fs"
|
||||
import { ICommand } from "interfaces"
|
||||
import path from "path"
|
||||
import { ExtendedClient as Client } from "utils/Client.js"
|
||||
import color from "utils/functions/colors.js"
|
||||
import { embedColor } from "config/options.js"
|
||||
import { ICommand } from "interfaces"
|
||||
import { Events } from "discord.js"
|
||||
import path from "path"
|
||||
import fs from "fs"
|
||||
import logToChannel from "utils/functions/logtochannel.js"
|
||||
type FileType = "js" | "ts"
|
||||
const __dirname = import.meta.dirname
|
||||
@@ -29,7 +29,7 @@ export default async function loadSlashCommandsEvents(client: Client, ft: FileTy
|
||||
}
|
||||
}
|
||||
|
||||
//! command handler
|
||||
// ! command handler
|
||||
client.on(Events.InteractionCreate, async interaction => {
|
||||
if (!interaction.isChatInputCommand()) return
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { ExtendedClient as Client } from "utils/Client.js"
|
||||
import color from "utils/functions/colors.js"
|
||||
import { IContextMenu } from "interfaces"
|
||||
import { embedColor } from "config/options.js"
|
||||
import { Events } from "discord.js"
|
||||
import path from "path"
|
||||
import fs from "fs"
|
||||
import { IContextMenu } from "interfaces"
|
||||
import path from "path"
|
||||
import { ExtendedClient as Client } from "utils/Client.js"
|
||||
import color from "utils/functions/colors.js"
|
||||
import logToChannel from "utils/functions/logtochannel.js"
|
||||
type FileType = "js" | "ts"
|
||||
const __dirname = import.meta.dirname
|
||||
@@ -29,7 +29,7 @@ export default async function loadContextMenuEvents(client: Client, ft: FileType
|
||||
}
|
||||
}
|
||||
|
||||
//! context menu command handler
|
||||
// ! context menu command handler
|
||||
client.on(Events.InteractionCreate, async interaction => {
|
||||
if (!interaction.isContextMenuCommand()) return
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { CronJob } from "cron"
|
||||
import path from "path"
|
||||
import fs from "fs"
|
||||
import { ICron } from "interfaces"
|
||||
import path from "path"
|
||||
const __dirname = import.meta.dirname
|
||||
|
||||
export default async function loadCronEvents() {
|
||||
@@ -12,8 +12,7 @@ export default async function loadCronEvents() {
|
||||
const filePath = path.join(cronPath, file)
|
||||
const { default: cron } = await import("file://" + filePath) as { default: ICron }
|
||||
|
||||
const time =
|
||||
cron.time.seconds + " " +
|
||||
const time = cron.time.seconds + " " +
|
||||
cron.time.minutes + " " +
|
||||
cron.time.hours + " " +
|
||||
cron.time.dayOfMonth + " " +
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { ExtendedClient as Client } from "utils/Client.js"
|
||||
import fs from "fs"
|
||||
import { IEvent } from "interfaces"
|
||||
import path from "path"
|
||||
import fs from "fs"
|
||||
import { ExtendedClient as Client } from "utils/Client.js"
|
||||
const __dirname = import.meta.dirname
|
||||
|
||||
export default async function loadEvents(client: Client) {
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { embedColor } from "config/options.js"
|
||||
import { Events } from "discord.js"
|
||||
import fs from "fs"
|
||||
import { IModal } from "interfaces"
|
||||
import path from "path"
|
||||
import { ExtendedClient as Client } from "utils/Client.js"
|
||||
import color from "utils/functions/colors.js"
|
||||
import { embedColor } from "config/options.js"
|
||||
import { IModal } from "interfaces"
|
||||
import { Events } from "discord.js"
|
||||
import path from "path"
|
||||
import fs from "fs"
|
||||
import logToChannel from "utils/functions/logtochannel.js"
|
||||
type FileType = "js" | "ts"
|
||||
const __dirname = import.meta.dirname
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
export { skywarsLevel } from "./HypixelFunctions/skywars.js"
|
||||
export { getGuild, getHeadURL, getIGN, getPlayer, getUUID } from "./HypixelFunctions/account.js"
|
||||
export { bedwarsLevel } from "./HypixelFunctions/bedwars.js"
|
||||
export { hypixelLevel } from "./HypixelFunctions/main.js"
|
||||
export { formatUuid } from "./HypixelFunctions/uuid.js"
|
||||
export { guildLevel, scaledGEXP } from "./HypixelFunctions/guild.js"
|
||||
export { getUUID, getIGN, getPlayer, getGuild, getHeadURL } from "./HypixelFunctions/account.js"
|
||||
export { hypixelLevel } from "./HypixelFunctions/main.js"
|
||||
export { skywarsLevel } from "./HypixelFunctions/skywars.js"
|
||||
export { formatUuid } from "./HypixelFunctions/uuid.js"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import fetch from "axios"
|
||||
import env from "utils/Env.js"
|
||||
import { IPlayer, IPlayerData } from "interfaces"
|
||||
import { IGuild, IGuildData } from "interfaces"
|
||||
import env from "utils/Env.js"
|
||||
const apikey = env.prod.hypixelapikey
|
||||
const mojang = "https://api.mojang.com/users/profiles/minecraft/"
|
||||
const mojanguuid = "https://sessionserver.mojang.com/session/minecraft/profile/"
|
||||
@@ -21,7 +21,7 @@ type Profile2 = {
|
||||
data: {
|
||||
id: string
|
||||
name: string
|
||||
properties: { name: string; value: string }[]
|
||||
properties: { name: string, value: string }[]
|
||||
profileActions: []
|
||||
}
|
||||
}
|
||||
@@ -86,4 +86,4 @@ async function getHeadURL(ign: string): Promise<string | null> {
|
||||
return minotar + ign
|
||||
}
|
||||
|
||||
export { getUUID, getIGN, getPlayer, getGuild, getHeadURL }
|
||||
export { getGuild, getHeadURL, getIGN, getPlayer, getUUID }
|
||||
|
||||
@@ -3,8 +3,21 @@
|
||||
*/
|
||||
function guildLevel(exp: number): number {
|
||||
const EXP_NEEDED = [
|
||||
100000, 150000, 250000, 500000, 750000, 1000000, 1250000, 1500000,
|
||||
2000000, 2500000, 2500000, 2500000, 2500000, 2500000, 3000000
|
||||
100000,
|
||||
150000,
|
||||
250000,
|
||||
500000,
|
||||
750000,
|
||||
1000000,
|
||||
1250000,
|
||||
1500000,
|
||||
2000000,
|
||||
2500000,
|
||||
2500000,
|
||||
2500000,
|
||||
2500000,
|
||||
2500000,
|
||||
3000000
|
||||
]
|
||||
|
||||
let level = 0
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import { ExtendedClient as Client } from "utils/Client.js"
|
||||
import color from "utils/functions/colors.js"
|
||||
import { Redis } from "ioredis"
|
||||
import { ExtendedClient as Client } from "utils/Client.js"
|
||||
import env from "utils/Env.js"
|
||||
import color from "utils/functions/colors.js"
|
||||
// import { connect } from "mongoose"
|
||||
import loadAllEvents from "./Events/loadevents.js"
|
||||
import { Player } from "discord-player"
|
||||
import { Sequelize } from "sequelize"
|
||||
import { YoutubeiExtractor } from "discord-player-youtubei"
|
||||
import { Sequelize } from "sequelize"
|
||||
import loadAllEvents from "./Events/loadevents.js"
|
||||
|
||||
const client = new Client()
|
||||
const redis = new Redis(env.prod.redisURI)
|
||||
@@ -73,4 +73,4 @@ class Illegitimate {
|
||||
}
|
||||
}
|
||||
|
||||
export { Illegitimate, client, redis, sequelize }
|
||||
export { client, Illegitimate, redis, sequelize }
|
||||
|
||||
@@ -12,7 +12,6 @@ const attachments = new EmbedBuilder()
|
||||
.setDescription("You have uploaded an attachment. Please do not upload images, videos, or GIFS.")
|
||||
.setColor(embedColor)
|
||||
|
||||
|
||||
export default async function applicationQuestions(
|
||||
input: Collection<string, Message<boolean>>,
|
||||
user: GuildMember,
|
||||
@@ -71,4 +70,4 @@ export default async function applicationQuestions(
|
||||
}
|
||||
return input!.first()!.content
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,4 +4,4 @@ export function capitalizeFirstLetter(str: string): string {
|
||||
|
||||
export function removeIndents(str: string): string {
|
||||
return str.replace(/^ */gm, "")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +1,4 @@
|
||||
import {
|
||||
guildid,
|
||||
onlineLogChannel,
|
||||
botLogChannel,
|
||||
guildLogChannel,
|
||||
errorLogChannel,
|
||||
moderationLogChannel,
|
||||
devLogChannel
|
||||
} from "config/options.js"
|
||||
import { botLogChannel, devLogChannel, errorLogChannel, guildid, guildLogChannel, moderationLogChannel, onlineLogChannel } from "config/options.js"
|
||||
import { Guild, MessageCreateOptions, TextChannel } from "discord.js"
|
||||
import { client } from "utils/Illegitimate.js"
|
||||
|
||||
|
||||
@@ -1,15 +1,4 @@
|
||||
import {
|
||||
gm,
|
||||
manager,
|
||||
moderator,
|
||||
beast,
|
||||
elite,
|
||||
member,
|
||||
guildStaff,
|
||||
guildRole,
|
||||
defaultMember,
|
||||
verifyTick
|
||||
} from "config/roles.js"
|
||||
import { beast, defaultMember, elite, gm, guildRole, guildStaff, manager, member, moderator, verifyTick } from "config/roles.js"
|
||||
const roles = [
|
||||
gm,
|
||||
manager,
|
||||
|
||||
Reference in New Issue
Block a user