chore: Code changes & formatting and linting (#3552)

* Do some code changes & run prettier and eslint

* Fix test:test-type script

* Apply code review suggestions

* update heartbeat interval & add a reason for the specific value

* Fix husky error

* Update to TS 5.5

And use ${configDir}

* Fix test.json tsconfig base

---------

Co-authored-by: Skillz4Killz <23035000+Skillz4Killz@users.noreply.github.com>
This commit is contained in:
Fleny
2024-07-08 15:11:41 -05:00
committed by GitHub
co-authored by Skillz4Killz
parent 2f89d4da30
commit 97a8016041
83 changed files with 370 additions and 526 deletions
+4 -7
View File
@@ -1,5 +1,5 @@
import { Intents } from '@discordeno/types'
import { delay, logger } from '@discordeno/utils'
import { delay, logger, snakeToCamelCase } from '@discordeno/utils'
import { use as chaiUse } from 'chai'
import chaiAsPromised from 'chai-as-promised'
import { describe, it } from 'mocha'
@@ -23,12 +23,9 @@ describe('[Bot] Delete any guild owned guilds', () => {
// RUN DISPATCH CHECK
await bot.events.dispatchRequirements?.(data, shard.id)
bot.events[
data.t.toLowerCase().replace(/_([a-z])/g, function (g) {
return g[1].toUpperCase()
}) as keyof EventHandlers
// @ts-expect-error as any gets removed by linter
]?.(data.d, shard)
const eventName = snakeToCamelCase(data.t)
bot.events[eventName as keyof EventHandlers]?.(data.d as never, shard as never)
},
},
intents: Intents.Guilds,