mirror of
https://github.com/discordeno/discordeno.git
synced 2026-09-17 08:47:22 +00:00
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:
@@ -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,
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"extends": "tsconfig/test.json"
|
||||
}
|
||||
Reference in New Issue
Block a user