mirror of
https://github.com/discordeno/discordeno.git
synced 2026-09-17 08:47:22 +00:00
chore: Migrate ESLint and prettier to Biome (#3634)
* Migrate eslint and prettier to biomejs This does NOT include examples/bigbot as it has its own formatter * Update to biome 1.8.0 * Readd dotenv dev dependency to rest During a merge it got lost
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { Collection, type ApplicationCommandOption, type ApplicationCommandTypes, type Interaction } from '@discordeno/bot'
|
||||
import { type ApplicationCommandOption, type ApplicationCommandTypes, Collection, type Interaction } from '@discordeno/bot'
|
||||
|
||||
export const commands = new Collection<string, Command>()
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { ApplicationCommandOptionTypes, hasProperty, type Guild } from '@discordeno/bot'
|
||||
import { ApplicationCommandOptionTypes, type Guild, hasProperty } from '@discordeno/bot'
|
||||
import chalk from 'chalk'
|
||||
import { bot } from '../bot.js'
|
||||
import { commands } from '../commands.js'
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
import { hasProperty, type Bot, type CreateApplicationCommand, type Guild } from '@discordeno/bot'
|
||||
import { type Bot, type CreateApplicationCommand, type Guild, hasProperty } from '@discordeno/bot'
|
||||
import { bot } from '../bot.js'
|
||||
import { commands, type SubCommand, type SubCommandGroup } from '../commands.js'
|
||||
import { type SubCommand, type SubCommandGroup, commands } from '../commands.js'
|
||||
import { createLogger } from './logger.js'
|
||||
|
||||
const logger = createLogger({ name: 'Helpers' })
|
||||
|
||||
/** This function will update all commands, or the defined scope */
|
||||
export async function updateCommands(scope?: 'Guild' | 'Global'): Promise<void> {
|
||||
const globalCommands: Array<MakeRequired<CreateApplicationCommand, 'name'>> = []
|
||||
const perGuildCommands: Array<MakeRequired<CreateApplicationCommand, 'name'>> = []
|
||||
const globalCommands: MakeRequired<CreateApplicationCommand, 'name'>[] = []
|
||||
const perGuildCommands: MakeRequired<CreateApplicationCommand, 'name'>[] = []
|
||||
|
||||
for (const command of commands.values()) {
|
||||
if (command.scope === 'Guild') {
|
||||
@@ -44,7 +44,7 @@ export async function updateCommands(scope?: 'Guild' | 'Global'): Promise<void>
|
||||
|
||||
/** Update commands for a guild */
|
||||
export async function updateGuildCommands(bot: Bot, guild: Guild): Promise<void> {
|
||||
const perGuildCommands: Array<MakeRequired<CreateApplicationCommand, 'name'>> = []
|
||||
const perGuildCommands: MakeRequired<CreateApplicationCommand, 'name'>[] = []
|
||||
|
||||
for (const command of commands.values()) {
|
||||
if (command.scope === 'Guild') {
|
||||
|
||||
Reference in New Issue
Block a user