Update examples to v20 (#4032)

This commit is contained in:
Fleny
2024-11-28 23:48:14 +01:00
committed by GitHub
parent 58fccd8d14
commit 527ef5d733
19 changed files with 190 additions and 215 deletions

View File

@@ -13,8 +13,8 @@
"setup-dd": ""
},
"dependencies": {
"@discordeno/bot": "19.0.0",
"dd-cache-proxy": "^2.3.0",
"@discordeno/bot": "20.0.0",
"dd-cache-proxy": "^2.5.0",
"dotenv": "^16.4.5"
},
"devDependencies": {

View File

@@ -1,4 +1,4 @@
import { type Collection, Intents, LogDepth, createBot, type logger as discordenoLogger } from '@discordeno/bot'
import { Intents, LogDepth, createBot, type logger as discordenoLogger } from '@discordeno/bot'
import { createProxyCache } from 'dd-cache-proxy'
import { configs } from './config.js'
@@ -40,32 +40,17 @@ const rawBot = createBot({
},
})
// TODO: remove this type hack when dd-cache-proxy fixes support for v19
// @ts-expect-error
export const bot = createProxyCache(rawBot, {
desiredProps: {
guilds: ['id', 'name', 'roles'],
guild: ['id', 'name', 'ownerId', 'roles'],
roles: ['id', 'guildId', 'permissions'],
},
cacheInMemory: {
guilds: true,
roles: true,
guild: true,
role: true,
default: false,
},
}) as CacheBot
export type CacheBot = typeof rawBot & {
cache: {
guild: {
memory: Collection<bigint, typeof rawBot.transformers.$inferredTypes.guild>
get: (guildId: bigint) => typeof rawBot.transformers.$inferredTypes.guild
}
role: {
memory: Collection<bigint, typeof rawBot.transformers.$inferredTypes.role>
get: (roleId: bigint) => typeof rawBot.transformers.$inferredTypes.role
}
}
}
})
// By default, bot.logger will use an instance of the logger from @discordeno/bot, this logger supports depth and we need to change it, so we need to say to TS that we know what we are doing with as
;(bot.logger as typeof discordenoLogger).setDepth(LogDepth.Full)

View File

@@ -30,9 +30,9 @@ createCommand({
// Type based on the options declared above
const { user, reason } = options as { user: UserResolved; reason?: string }
const guild = await bot.cache.guild.get(interaction.guildId)
const guild = await bot.cache.guilds.get(interaction.guildId)
if (!guild) {
if (!guild || !guild.roles) {
await interaction.respond('An error has occurred')
return
}

View File

@@ -12,7 +12,6 @@ bot.events.interactionCreate = async (interaction) => {
return
}
// @ts-expect-error commandOptionsParser requires the entire Interaction object, this is a bug in @discordeno/bot
const options = commandOptionsParser(interaction)
try {

View File

@@ -3,13 +3,13 @@ import { BitwisePermissionFlags } from '@discordeno/bot'
import type { bot } from '../bot.js'
export async function calculateMemberPermissions(
guild: typeof bot.transformers.$inferredTypes.guild,
guild: typeof bot.transformers.$inferredTypes.guild | typeof bot.cache.$inferredTypes.guild,
member: typeof bot.transformers.$inferredTypes.member,
) {
if (member.id === guild.ownerId) return 8n
let permissions = guild.roles.get(guild.id)?.permissions.bitfield
const rolePerms = member.roles.map((x) => guild.roles.get(x)?.permissions.bitfield).filter((x): x is bigint => x !== undefined)
let permissions = guild.roles?.get(guild.id)?.permissions.bitfield
const rolePerms = member.roles.map((x) => guild.roles?.get(x)?.permissions.bitfield).filter((x): x is bigint => x !== undefined)
// Small hack to avoid calling assert with 0n
if (permissions === undefined) assert(permissions)

View File

@@ -5,56 +5,56 @@ __metadata:
version: 8
cacheKey: 10
"@discordeno/bot@npm:19.0.0":
version: 19.0.0
resolution: "@discordeno/bot@npm:19.0.0"
"@discordeno/bot@npm:20.0.0":
version: 20.0.0
resolution: "@discordeno/bot@npm:20.0.0"
dependencies:
"@discordeno/gateway": "npm:19.0.0"
"@discordeno/rest": "npm:19.0.0"
"@discordeno/types": "npm:19.0.0"
"@discordeno/utils": "npm:19.0.0"
checksum: 86ac4cd61761c1b3c3fa82db08742dcdba18ffb1b6042455c8a5e8cdd02231543c3c2d43dfb29084d44034cafebdc6ab51969c5930281ab2be83d5b159b69726
"@discordeno/gateway": "npm:20.0.0"
"@discordeno/rest": "npm:20.0.0"
"@discordeno/types": "npm:20.0.0"
"@discordeno/utils": "npm:20.0.0"
checksum: 9813615392df2ad1b1982c022e9f2921163c49392393be214bc62c2d799629c343cb9d531b4acbdbabf160de0e85aa333c1ef8a0c1d71ce8f9f1badf3ba641ef
languageName: node
linkType: hard
"@discordeno/gateway@npm:19.0.0":
version: 19.0.0
resolution: "@discordeno/gateway@npm:19.0.0"
"@discordeno/gateway@npm:20.0.0":
version: 20.0.0
resolution: "@discordeno/gateway@npm:20.0.0"
dependencies:
"@discordeno/types": "npm:19.0.0"
"@discordeno/utils": "npm:19.0.0"
"@discordeno/types": "npm:20.0.0"
"@discordeno/utils": "npm:20.0.0"
fzstd: "npm:^0.1.1"
ws: "npm:^8.18.0"
dependenciesMeta:
fzstd:
optional: true
checksum: 241ec9981bf47ff894990889477fbc1ce91361648534189361e9dca4d927aba15c941604da29ba135cb20871fac7e82e5cc1eed1df6ef3d86bbcdfdca3448649
checksum: 631e4a91576b715062d8187230d34b6279a69a0ddf665784445497ad7e37c9ecc08fa469234935a236e41168e746de0d93bc83fdf502e2dd39158c50cc432eda
languageName: node
linkType: hard
"@discordeno/rest@npm:19.0.0":
version: 19.0.0
resolution: "@discordeno/rest@npm:19.0.0"
"@discordeno/rest@npm:20.0.0":
version: 20.0.0
resolution: "@discordeno/rest@npm:20.0.0"
dependencies:
"@discordeno/types": "npm:19.0.0"
"@discordeno/utils": "npm:19.0.0"
checksum: e1ce6c092566e58c5d407a5fee7c6c38f988251abcbaaf14beaa084691b4c52dc4f6c54f46974735090fafe174b1914374edd074bffd441e11d76851575a136f
"@discordeno/types": "npm:20.0.0"
"@discordeno/utils": "npm:20.0.0"
checksum: 1520aaabfb88988eddb44b0fd8d2b7b827a032c41a277ed1ae1e816e14f9af0d5e43089c358898a6c8913db1e8e80eeacc85e132b29a94e5fd6c08753a71fca4
languageName: node
linkType: hard
"@discordeno/types@npm:19.0.0":
version: 19.0.0
resolution: "@discordeno/types@npm:19.0.0"
checksum: aaf832d6510b7aa0ead75bd5c1d1990f3a77fa980d40122d6d092abc571280aed6864b10fdda705d70bd7ba73961f4b3a0ee28c6b7cabb09595574f65fcfd61c
"@discordeno/types@npm:20.0.0":
version: 20.0.0
resolution: "@discordeno/types@npm:20.0.0"
checksum: 8679feda51c9b282e7f42bf6cb22ed02b9e264a6c8fdc157a0c827fbf3a66101e38ad0f599012cc4362189b0435234d7f41a8af2f744c69ba63e645aa4244f66
languageName: node
linkType: hard
"@discordeno/utils@npm:19.0.0":
version: 19.0.0
resolution: "@discordeno/utils@npm:19.0.0"
"@discordeno/utils@npm:20.0.0":
version: 20.0.0
resolution: "@discordeno/utils@npm:20.0.0"
dependencies:
"@discordeno/types": "npm:19.0.0"
checksum: b2d430099672cfb8b68d6a9bd12803cd69cb909dc1f368d8305a4bb1067499babff05997a29599b51029d0add435bea4a03929140abf77dd83e1741baaa37855
"@discordeno/types": "npm:20.0.0"
checksum: a83a61158357f95070a3f78a24e2ad805aaacbefc35c5fa5c3c6fc1a85119a3bc0d14db7f6525dba408f1b37db6cd733454ee0161e366675c5971983c092a8a9
languageName: node
linkType: hard
@@ -623,22 +623,22 @@ __metadata:
version: 0.0.0-use.local
resolution: "dd-advanced-bot@workspace:."
dependencies:
"@discordeno/bot": "npm:19.0.0"
"@discordeno/bot": "npm:20.0.0"
"@swc/cli": "npm:^0.5.0"
"@swc/core": "npm:^1.9.2"
"@types/node": "npm:^22.9.0"
dd-cache-proxy: "npm:^2.3.0"
dd-cache-proxy: "npm:^2.5.0"
dotenv: "npm:^16.4.5"
typescript: "npm:^5.6.3"
languageName: unknown
linkType: soft
"dd-cache-proxy@npm:^2.3.0":
version: 2.3.0
resolution: "dd-cache-proxy@npm:2.3.0"
"dd-cache-proxy@npm:^2.5.0":
version: 2.5.0
resolution: "dd-cache-proxy@npm:2.5.0"
peerDependencies:
"@discordeno/bot": 19.0.0-next.b85c6d5
checksum: eda7d43717567b7836208c9690bbc0a547179ff7319daf5ccc08c83bc44d481854bcb474075021646ddc8560015d8b0d5e5c66f72ace67f858484b805a40f5a1
"@discordeno/bot": ^20.0.0
checksum: 459f0013e69c571ef9477bc311b1d2946c0021842e661aadc7ab15e51670fa413a4eb1af0a051ce3bc345aebeaeaa01634fe38588e3f9cf08b32e49f5a7cb917
languageName: node
linkType: hard

View File

@@ -13,9 +13,9 @@
"setup-dd": ""
},
"dependencies": {
"@discordeno/bot": "19.0.0",
"@discordeno/bot": "20.0.0",
"chalk": "^5.3.0",
"dd-cache-proxy": "^2.3.0",
"dd-cache-proxy": "^2.5.0",
"dotenv": "^16.4.5"
},
"devDependencies": {

View File

@@ -1,4 +1,4 @@
import { type Collection, Intents, createBot } from '@discordeno/bot'
import { Intents, createBot } from '@discordeno/bot'
import { createProxyCache } from 'dd-cache-proxy'
import { configs } from './config.js'
@@ -24,23 +24,12 @@ const rawBot = createBot({
},
})
// TODO: remove this type hack when dd-cache-proxy fixes support for v19
// @ts-expect-error
export const bot = createProxyCache(rawBot, {
desiredProps: {
guilds: ['id', 'name'],
guild: ['id', 'name'],
},
cacheInMemory: {
guilds: true,
guild: true,
default: false,
},
}) as CacheBot
export type CacheBot = typeof rawBot & {
cache: {
guild: {
memory: Collection<bigint, typeof rawBot.transformers.$inferredTypes.guild>
get: (guildId: bigint) => typeof rawBot.transformers.$inferredTypes.guild
}
}
}
})

View File

@@ -35,7 +35,7 @@ export async function updateCommands(scope?: 'Guild' | 'Global'): Promise<void>
if (perGuildCommands.length && (scope === 'Guild' || scope === undefined)) {
await Promise.all(
bot.cache.guild.memory.map(async (guild) => {
bot.cache.guilds.memory.map(async (guild) => {
await bot.helpers.upsertGuildApplicationCommands(guild.id, perGuildCommands)
}),
)
@@ -63,7 +63,7 @@ export async function updateGuildCommands(guild: typeof bot.transformers.$inferr
}
export async function getGuildFromId(guildId: bigint) {
const cached = await bot.cache.guild.get(guildId)
const cached = await bot.cache.guilds.get(guildId)
if (cached) return cached

View File

@@ -5,56 +5,56 @@ __metadata:
version: 8
cacheKey: 10
"@discordeno/bot@npm:19.0.0":
version: 19.0.0
resolution: "@discordeno/bot@npm:19.0.0"
"@discordeno/bot@npm:20.0.0":
version: 20.0.0
resolution: "@discordeno/bot@npm:20.0.0"
dependencies:
"@discordeno/gateway": "npm:19.0.0"
"@discordeno/rest": "npm:19.0.0"
"@discordeno/types": "npm:19.0.0"
"@discordeno/utils": "npm:19.0.0"
checksum: 86ac4cd61761c1b3c3fa82db08742dcdba18ffb1b6042455c8a5e8cdd02231543c3c2d43dfb29084d44034cafebdc6ab51969c5930281ab2be83d5b159b69726
"@discordeno/gateway": "npm:20.0.0"
"@discordeno/rest": "npm:20.0.0"
"@discordeno/types": "npm:20.0.0"
"@discordeno/utils": "npm:20.0.0"
checksum: 9813615392df2ad1b1982c022e9f2921163c49392393be214bc62c2d799629c343cb9d531b4acbdbabf160de0e85aa333c1ef8a0c1d71ce8f9f1badf3ba641ef
languageName: node
linkType: hard
"@discordeno/gateway@npm:19.0.0":
version: 19.0.0
resolution: "@discordeno/gateway@npm:19.0.0"
"@discordeno/gateway@npm:20.0.0":
version: 20.0.0
resolution: "@discordeno/gateway@npm:20.0.0"
dependencies:
"@discordeno/types": "npm:19.0.0"
"@discordeno/utils": "npm:19.0.0"
"@discordeno/types": "npm:20.0.0"
"@discordeno/utils": "npm:20.0.0"
fzstd: "npm:^0.1.1"
ws: "npm:^8.18.0"
dependenciesMeta:
fzstd:
optional: true
checksum: 241ec9981bf47ff894990889477fbc1ce91361648534189361e9dca4d927aba15c941604da29ba135cb20871fac7e82e5cc1eed1df6ef3d86bbcdfdca3448649
checksum: 631e4a91576b715062d8187230d34b6279a69a0ddf665784445497ad7e37c9ecc08fa469234935a236e41168e746de0d93bc83fdf502e2dd39158c50cc432eda
languageName: node
linkType: hard
"@discordeno/rest@npm:19.0.0":
version: 19.0.0
resolution: "@discordeno/rest@npm:19.0.0"
"@discordeno/rest@npm:20.0.0":
version: 20.0.0
resolution: "@discordeno/rest@npm:20.0.0"
dependencies:
"@discordeno/types": "npm:19.0.0"
"@discordeno/utils": "npm:19.0.0"
checksum: e1ce6c092566e58c5d407a5fee7c6c38f988251abcbaaf14beaa084691b4c52dc4f6c54f46974735090fafe174b1914374edd074bffd441e11d76851575a136f
"@discordeno/types": "npm:20.0.0"
"@discordeno/utils": "npm:20.0.0"
checksum: 1520aaabfb88988eddb44b0fd8d2b7b827a032c41a277ed1ae1e816e14f9af0d5e43089c358898a6c8913db1e8e80eeacc85e132b29a94e5fd6c08753a71fca4
languageName: node
linkType: hard
"@discordeno/types@npm:19.0.0":
version: 19.0.0
resolution: "@discordeno/types@npm:19.0.0"
checksum: aaf832d6510b7aa0ead75bd5c1d1990f3a77fa980d40122d6d092abc571280aed6864b10fdda705d70bd7ba73961f4b3a0ee28c6b7cabb09595574f65fcfd61c
"@discordeno/types@npm:20.0.0":
version: 20.0.0
resolution: "@discordeno/types@npm:20.0.0"
checksum: 8679feda51c9b282e7f42bf6cb22ed02b9e264a6c8fdc157a0c827fbf3a66101e38ad0f599012cc4362189b0435234d7f41a8af2f744c69ba63e645aa4244f66
languageName: node
linkType: hard
"@discordeno/utils@npm:19.0.0":
version: 19.0.0
resolution: "@discordeno/utils@npm:19.0.0"
"@discordeno/utils@npm:20.0.0":
version: 20.0.0
resolution: "@discordeno/utils@npm:20.0.0"
dependencies:
"@discordeno/types": "npm:19.0.0"
checksum: b2d430099672cfb8b68d6a9bd12803cd69cb909dc1f368d8305a4bb1067499babff05997a29599b51029d0add435bea4a03929140abf77dd83e1741baaa37855
"@discordeno/types": "npm:20.0.0"
checksum: a83a61158357f95070a3f78a24e2ad805aaacbefc35c5fa5c3c6fc1a85119a3bc0d14db7f6525dba408f1b37db6cd733454ee0161e366675c5971983c092a8a9
languageName: node
linkType: hard
@@ -630,23 +630,23 @@ __metadata:
version: 0.0.0-use.local
resolution: "dd-beginner-bot@workspace:."
dependencies:
"@discordeno/bot": "npm:19.0.0"
"@discordeno/bot": "npm:20.0.0"
"@swc/cli": "npm:^0.5.0"
"@swc/core": "npm:^1.9.2"
"@types/node": "npm:^22.9.0"
chalk: "npm:^5.3.0"
dd-cache-proxy: "npm:^2.3.0"
dd-cache-proxy: "npm:^2.5.0"
dotenv: "npm:^16.4.5"
typescript: "npm:^5.6.3"
languageName: unknown
linkType: soft
"dd-cache-proxy@npm:^2.3.0":
version: 2.3.0
resolution: "dd-cache-proxy@npm:2.3.0"
"dd-cache-proxy@npm:^2.5.0":
version: 2.5.0
resolution: "dd-cache-proxy@npm:2.5.0"
peerDependencies:
"@discordeno/bot": 19.0.0-next.b85c6d5
checksum: eda7d43717567b7836208c9690bbc0a547179ff7319daf5ccc08c83bc44d481854bcb474075021646ddc8560015d8b0d5e5c66f72ace67f858484b805a40f5a1
"@discordeno/bot": ^20.0.0
checksum: 459f0013e69c571ef9477bc311b1d2946c0021842e661aadc7ab15e51670fa413a4eb1af0a051ce3bc345aebeaeaa01634fe38588e3f9cf08b32e49f5a7cb917
languageName: node
linkType: hard

View File

@@ -19,7 +19,7 @@
"setup-dd": ""
},
"dependencies": {
"@discordeno/bot": "19.0.0",
"@discordeno/bot": "20.0.0",
"@fastify/multipart": "^9.0.1",
"@influxdata/influxdb-client": "^1.33.2",
"amqplib": "^0.10.4",

View File

@@ -1,5 +1,6 @@
import type {
ApplicationCommandOptionTypes,
Bot,
Camelize,
CreateApplicationCommand,
DiscordApplicationCommandOption,
@@ -35,7 +36,7 @@ export type CommandOptions = CommandOption[]
// Option parsing
type ResolvedValues = ParsedInteractionOption[string]
type ResolvedValues = ParsedInteractionOption<ExtractDesiredProps<typeof bot>, ExtractDesiredBehavior<typeof bot>>[string]
// Using omit + exclude is a slight trick to avoid a type error on Pick
export type InteractionResolvedChannel = Omit<
@@ -79,3 +80,6 @@ type GetOptionValue<T> = T extends { type: ApplicationCommandOptionTypes; requir
type BuildOptions<T extends CommandOptions | undefined> = {
[Prop in keyof Omit<T, keyof unknown[]> as GetOptionName<T[Prop]>]: GetOptionValue<T[Prop]>
}
type ExtractDesiredProps<T> = T extends Bot<infer Props, infer _Behavior> ? Props : never
type ExtractDesiredBehavior<T> = T extends Bot<infer _Props, infer Behavior> ? Behavior : never

View File

@@ -19,7 +19,6 @@ bot.events.interactionCreate = async (interaction) => {
logCommand(interaction, 'Trigger', interaction.data.name)
// @ts-expect-error commandOptionsParser is currently bugged
const options = commandOptionsParser(interaction)
try {

View File

@@ -16,56 +16,56 @@ __metadata:
languageName: node
linkType: hard
"@discordeno/bot@npm:19.0.0":
version: 19.0.0
resolution: "@discordeno/bot@npm:19.0.0"
"@discordeno/bot@npm:20.0.0":
version: 20.0.0
resolution: "@discordeno/bot@npm:20.0.0"
dependencies:
"@discordeno/gateway": "npm:19.0.0"
"@discordeno/rest": "npm:19.0.0"
"@discordeno/types": "npm:19.0.0"
"@discordeno/utils": "npm:19.0.0"
checksum: 86ac4cd61761c1b3c3fa82db08742dcdba18ffb1b6042455c8a5e8cdd02231543c3c2d43dfb29084d44034cafebdc6ab51969c5930281ab2be83d5b159b69726
"@discordeno/gateway": "npm:20.0.0"
"@discordeno/rest": "npm:20.0.0"
"@discordeno/types": "npm:20.0.0"
"@discordeno/utils": "npm:20.0.0"
checksum: 9813615392df2ad1b1982c022e9f2921163c49392393be214bc62c2d799629c343cb9d531b4acbdbabf160de0e85aa333c1ef8a0c1d71ce8f9f1badf3ba641ef
languageName: node
linkType: hard
"@discordeno/gateway@npm:19.0.0":
version: 19.0.0
resolution: "@discordeno/gateway@npm:19.0.0"
"@discordeno/gateway@npm:20.0.0":
version: 20.0.0
resolution: "@discordeno/gateway@npm:20.0.0"
dependencies:
"@discordeno/types": "npm:19.0.0"
"@discordeno/utils": "npm:19.0.0"
"@discordeno/types": "npm:20.0.0"
"@discordeno/utils": "npm:20.0.0"
fzstd: "npm:^0.1.1"
ws: "npm:^8.18.0"
dependenciesMeta:
fzstd:
optional: true
checksum: 241ec9981bf47ff894990889477fbc1ce91361648534189361e9dca4d927aba15c941604da29ba135cb20871fac7e82e5cc1eed1df6ef3d86bbcdfdca3448649
checksum: 631e4a91576b715062d8187230d34b6279a69a0ddf665784445497ad7e37c9ecc08fa469234935a236e41168e746de0d93bc83fdf502e2dd39158c50cc432eda
languageName: node
linkType: hard
"@discordeno/rest@npm:19.0.0":
version: 19.0.0
resolution: "@discordeno/rest@npm:19.0.0"
"@discordeno/rest@npm:20.0.0":
version: 20.0.0
resolution: "@discordeno/rest@npm:20.0.0"
dependencies:
"@discordeno/types": "npm:19.0.0"
"@discordeno/utils": "npm:19.0.0"
checksum: e1ce6c092566e58c5d407a5fee7c6c38f988251abcbaaf14beaa084691b4c52dc4f6c54f46974735090fafe174b1914374edd074bffd441e11d76851575a136f
"@discordeno/types": "npm:20.0.0"
"@discordeno/utils": "npm:20.0.0"
checksum: 1520aaabfb88988eddb44b0fd8d2b7b827a032c41a277ed1ae1e816e14f9af0d5e43089c358898a6c8913db1e8e80eeacc85e132b29a94e5fd6c08753a71fca4
languageName: node
linkType: hard
"@discordeno/types@npm:19.0.0":
version: 19.0.0
resolution: "@discordeno/types@npm:19.0.0"
checksum: aaf832d6510b7aa0ead75bd5c1d1990f3a77fa980d40122d6d092abc571280aed6864b10fdda705d70bd7ba73961f4b3a0ee28c6b7cabb09595574f65fcfd61c
"@discordeno/types@npm:20.0.0":
version: 20.0.0
resolution: "@discordeno/types@npm:20.0.0"
checksum: 8679feda51c9b282e7f42bf6cb22ed02b9e264a6c8fdc157a0c827fbf3a66101e38ad0f599012cc4362189b0435234d7f41a8af2f744c69ba63e645aa4244f66
languageName: node
linkType: hard
"@discordeno/utils@npm:19.0.0":
version: 19.0.0
resolution: "@discordeno/utils@npm:19.0.0"
"@discordeno/utils@npm:20.0.0":
version: 20.0.0
resolution: "@discordeno/utils@npm:20.0.0"
dependencies:
"@discordeno/types": "npm:19.0.0"
checksum: b2d430099672cfb8b68d6a9bd12803cd69cb909dc1f368d8305a4bb1067499babff05997a29599b51029d0add435bea4a03929140abf77dd83e1741baaa37855
"@discordeno/types": "npm:20.0.0"
checksum: a83a61158357f95070a3f78a24e2ad805aaacbefc35c5fa5c3c6fc1a85119a3bc0d14db7f6525dba408f1b37db6cd733454ee0161e366675c5971983c092a8a9
languageName: node
linkType: hard
@@ -841,7 +841,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "dd-bigbot@workspace:."
dependencies:
"@discordeno/bot": "npm:19.0.0"
"@discordeno/bot": "npm:20.0.0"
"@fastify/multipart": "npm:^9.0.1"
"@influxdata/influxdb-client": "npm:^1.33.2"
"@swc/cli": "npm:^0.5.0"

View File

@@ -13,7 +13,7 @@
"setup-dd": ""
},
"dependencies": {
"@discordeno/bot": "19.0.0",
"@discordeno/bot": "20.0.0",
"chalk": "^5.3.0",
"dotenv": "^16.4.5"
},

View File

@@ -5,56 +5,56 @@ __metadata:
version: 8
cacheKey: 10
"@discordeno/bot@npm:19.0.0":
version: 19.0.0
resolution: "@discordeno/bot@npm:19.0.0"
"@discordeno/bot@npm:20.0.0":
version: 20.0.0
resolution: "@discordeno/bot@npm:20.0.0"
dependencies:
"@discordeno/gateway": "npm:19.0.0"
"@discordeno/rest": "npm:19.0.0"
"@discordeno/types": "npm:19.0.0"
"@discordeno/utils": "npm:19.0.0"
checksum: 86ac4cd61761c1b3c3fa82db08742dcdba18ffb1b6042455c8a5e8cdd02231543c3c2d43dfb29084d44034cafebdc6ab51969c5930281ab2be83d5b159b69726
"@discordeno/gateway": "npm:20.0.0"
"@discordeno/rest": "npm:20.0.0"
"@discordeno/types": "npm:20.0.0"
"@discordeno/utils": "npm:20.0.0"
checksum: 9813615392df2ad1b1982c022e9f2921163c49392393be214bc62c2d799629c343cb9d531b4acbdbabf160de0e85aa333c1ef8a0c1d71ce8f9f1badf3ba641ef
languageName: node
linkType: hard
"@discordeno/gateway@npm:19.0.0":
version: 19.0.0
resolution: "@discordeno/gateway@npm:19.0.0"
"@discordeno/gateway@npm:20.0.0":
version: 20.0.0
resolution: "@discordeno/gateway@npm:20.0.0"
dependencies:
"@discordeno/types": "npm:19.0.0"
"@discordeno/utils": "npm:19.0.0"
"@discordeno/types": "npm:20.0.0"
"@discordeno/utils": "npm:20.0.0"
fzstd: "npm:^0.1.1"
ws: "npm:^8.18.0"
dependenciesMeta:
fzstd:
optional: true
checksum: 241ec9981bf47ff894990889477fbc1ce91361648534189361e9dca4d927aba15c941604da29ba135cb20871fac7e82e5cc1eed1df6ef3d86bbcdfdca3448649
checksum: 631e4a91576b715062d8187230d34b6279a69a0ddf665784445497ad7e37c9ecc08fa469234935a236e41168e746de0d93bc83fdf502e2dd39158c50cc432eda
languageName: node
linkType: hard
"@discordeno/rest@npm:19.0.0":
version: 19.0.0
resolution: "@discordeno/rest@npm:19.0.0"
"@discordeno/rest@npm:20.0.0":
version: 20.0.0
resolution: "@discordeno/rest@npm:20.0.0"
dependencies:
"@discordeno/types": "npm:19.0.0"
"@discordeno/utils": "npm:19.0.0"
checksum: e1ce6c092566e58c5d407a5fee7c6c38f988251abcbaaf14beaa084691b4c52dc4f6c54f46974735090fafe174b1914374edd074bffd441e11d76851575a136f
"@discordeno/types": "npm:20.0.0"
"@discordeno/utils": "npm:20.0.0"
checksum: 1520aaabfb88988eddb44b0fd8d2b7b827a032c41a277ed1ae1e816e14f9af0d5e43089c358898a6c8913db1e8e80eeacc85e132b29a94e5fd6c08753a71fca4
languageName: node
linkType: hard
"@discordeno/types@npm:19.0.0":
version: 19.0.0
resolution: "@discordeno/types@npm:19.0.0"
checksum: aaf832d6510b7aa0ead75bd5c1d1990f3a77fa980d40122d6d092abc571280aed6864b10fdda705d70bd7ba73961f4b3a0ee28c6b7cabb09595574f65fcfd61c
"@discordeno/types@npm:20.0.0":
version: 20.0.0
resolution: "@discordeno/types@npm:20.0.0"
checksum: 8679feda51c9b282e7f42bf6cb22ed02b9e264a6c8fdc157a0c827fbf3a66101e38ad0f599012cc4362189b0435234d7f41a8af2f744c69ba63e645aa4244f66
languageName: node
linkType: hard
"@discordeno/utils@npm:19.0.0":
version: 19.0.0
resolution: "@discordeno/utils@npm:19.0.0"
"@discordeno/utils@npm:20.0.0":
version: 20.0.0
resolution: "@discordeno/utils@npm:20.0.0"
dependencies:
"@discordeno/types": "npm:19.0.0"
checksum: b2d430099672cfb8b68d6a9bd12803cd69cb909dc1f368d8305a4bb1067499babff05997a29599b51029d0add435bea4a03929140abf77dd83e1741baaa37855
"@discordeno/types": "npm:20.0.0"
checksum: a83a61158357f95070a3f78a24e2ad805aaacbefc35c5fa5c3c6fc1a85119a3bc0d14db7f6525dba408f1b37db6cd733454ee0161e366675c5971983c092a8a9
languageName: node
linkType: hard
@@ -630,7 +630,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "dd-minimal-bot@workspace:."
dependencies:
"@discordeno/bot": "npm:19.0.0"
"@discordeno/bot": "npm:20.0.0"
"@swc/cli": "npm:^0.5.0"
"@swc/core": "npm:^1.9.2"
"@types/node": "npm:^22.9.0"

View File

@@ -12,7 +12,7 @@
"setup-dd": ""
},
"dependencies": {
"@discordeno/bot": "19.0.0",
"@discordeno/bot": "20.0.0",
"dotenv": "^16.4.5"
},
"devDependencies": {

View File

@@ -19,7 +19,6 @@ export const event: typeof bot.events.interactionCreate = async (interaction) =>
if (!command) return
try {
// @ts-expect-error commandOptionsParser is bugged at the moment, it wants an Interaction and not the desired props customized interaction
await command.execute(interaction, commandOptionsParser(interaction))
} catch (error) {
console.error(error)

View File

@@ -5,56 +5,56 @@ __metadata:
version: 8
cacheKey: 10
"@discordeno/bot@npm:19.0.0":
version: 19.0.0
resolution: "@discordeno/bot@npm:19.0.0"
"@discordeno/bot@npm:20.0.0":
version: 20.0.0
resolution: "@discordeno/bot@npm:20.0.0"
dependencies:
"@discordeno/gateway": "npm:19.0.0"
"@discordeno/rest": "npm:19.0.0"
"@discordeno/types": "npm:19.0.0"
"@discordeno/utils": "npm:19.0.0"
checksum: 86ac4cd61761c1b3c3fa82db08742dcdba18ffb1b6042455c8a5e8cdd02231543c3c2d43dfb29084d44034cafebdc6ab51969c5930281ab2be83d5b159b69726
"@discordeno/gateway": "npm:20.0.0"
"@discordeno/rest": "npm:20.0.0"
"@discordeno/types": "npm:20.0.0"
"@discordeno/utils": "npm:20.0.0"
checksum: 9813615392df2ad1b1982c022e9f2921163c49392393be214bc62c2d799629c343cb9d531b4acbdbabf160de0e85aa333c1ef8a0c1d71ce8f9f1badf3ba641ef
languageName: node
linkType: hard
"@discordeno/gateway@npm:19.0.0":
version: 19.0.0
resolution: "@discordeno/gateway@npm:19.0.0"
"@discordeno/gateway@npm:20.0.0":
version: 20.0.0
resolution: "@discordeno/gateway@npm:20.0.0"
dependencies:
"@discordeno/types": "npm:19.0.0"
"@discordeno/utils": "npm:19.0.0"
"@discordeno/types": "npm:20.0.0"
"@discordeno/utils": "npm:20.0.0"
fzstd: "npm:^0.1.1"
ws: "npm:^8.18.0"
dependenciesMeta:
fzstd:
optional: true
checksum: 241ec9981bf47ff894990889477fbc1ce91361648534189361e9dca4d927aba15c941604da29ba135cb20871fac7e82e5cc1eed1df6ef3d86bbcdfdca3448649
checksum: 631e4a91576b715062d8187230d34b6279a69a0ddf665784445497ad7e37c9ecc08fa469234935a236e41168e746de0d93bc83fdf502e2dd39158c50cc432eda
languageName: node
linkType: hard
"@discordeno/rest@npm:19.0.0":
version: 19.0.0
resolution: "@discordeno/rest@npm:19.0.0"
"@discordeno/rest@npm:20.0.0":
version: 20.0.0
resolution: "@discordeno/rest@npm:20.0.0"
dependencies:
"@discordeno/types": "npm:19.0.0"
"@discordeno/utils": "npm:19.0.0"
checksum: e1ce6c092566e58c5d407a5fee7c6c38f988251abcbaaf14beaa084691b4c52dc4f6c54f46974735090fafe174b1914374edd074bffd441e11d76851575a136f
"@discordeno/types": "npm:20.0.0"
"@discordeno/utils": "npm:20.0.0"
checksum: 1520aaabfb88988eddb44b0fd8d2b7b827a032c41a277ed1ae1e816e14f9af0d5e43089c358898a6c8913db1e8e80eeacc85e132b29a94e5fd6c08753a71fca4
languageName: node
linkType: hard
"@discordeno/types@npm:19.0.0":
version: 19.0.0
resolution: "@discordeno/types@npm:19.0.0"
checksum: aaf832d6510b7aa0ead75bd5c1d1990f3a77fa980d40122d6d092abc571280aed6864b10fdda705d70bd7ba73961f4b3a0ee28c6b7cabb09595574f65fcfd61c
"@discordeno/types@npm:20.0.0":
version: 20.0.0
resolution: "@discordeno/types@npm:20.0.0"
checksum: 8679feda51c9b282e7f42bf6cb22ed02b9e264a6c8fdc157a0c827fbf3a66101e38ad0f599012cc4362189b0435234d7f41a8af2f744c69ba63e645aa4244f66
languageName: node
linkType: hard
"@discordeno/utils@npm:19.0.0":
version: 19.0.0
resolution: "@discordeno/utils@npm:19.0.0"
"@discordeno/utils@npm:20.0.0":
version: 20.0.0
resolution: "@discordeno/utils@npm:20.0.0"
dependencies:
"@discordeno/types": "npm:19.0.0"
checksum: b2d430099672cfb8b68d6a9bd12803cd69cb909dc1f368d8305a4bb1067499babff05997a29599b51029d0add435bea4a03929140abf77dd83e1741baaa37855
"@discordeno/types": "npm:20.0.0"
checksum: a83a61158357f95070a3f78a24e2ad805aaacbefc35c5fa5c3c6fc1a85119a3bc0d14db7f6525dba408f1b37db6cd733454ee0161e366675c5971983c092a8a9
languageName: node
linkType: hard
@@ -1613,7 +1613,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "reaction-roles@workspace:."
dependencies:
"@discordeno/bot": "npm:19.0.0"
"@discordeno/bot": "npm:20.0.0"
"@swc/cli": "npm:^0.5.0"
"@swc/core": "npm:^1.9.2"
"@types/node": "npm:^22.9.0"