diff --git a/files/tags.toml b/files/tags.toml index 1ba18d3..1ea96c4 100644 --- a/files/tags.toml +++ b/files/tags.toml @@ -23,4 +23,29 @@ content = """ Any idea what to add to bun? • Please consider if this is a request for bun, not for other 3rd party packages • [Open an issue on GitHub]() and fill out the given template +""" + +[hono] +keywords = ["express", "server", "routes"] +content = """ +**Hono - [炎] means flame🔥 in Japanese** +• Is a small, simple, and ultrafast web framework for Cloudflare Workers, Deno, Bun, and others + +[Bun doesn't currently support express because some native modules are missing, but you can use hono for now.]() +""" + +[not-same-file-system] +keywords = ["backend copyfile", "copyfile"] +content = """ +**error: NotSameFileSystem installing [package]** + +Bun uses hardlinks for installation by default. +Due to technical limitations, hardlinks won't work with different partitions, to evade this limitation, use the `--backend=copyfile` flag. +""" + +[windows] +keywords = ["windows support"] +content = """ +Bun does not currently have support for Windows, so you must use WSL (Windows Subsystem for Linux). +To install WSL, check [microsoft documentation](https://docs.microsoft.com/en-us/windows/wsl/install) """ \ No newline at end of file diff --git a/src/commands/tags.ts b/src/commands/tags.ts index f15e478..6e9aba9 100644 --- a/src/commands/tags.ts +++ b/src/commands/tags.ts @@ -24,7 +24,7 @@ new Command({ ], run: (ctx) => { const query: APIApplicationCommandInteractionDataStringOption = ctx.options[0] as APIApplicationCommandInteractionDataStringOption; - const target = ctx?.resolved?.users?.[0]; + const target = ctx?.resolved?.users ? Object.values(ctx?.resolved?.users)[0] : null; const tag = getTag(query.value); if (!tag) diff --git a/src/index.ts b/src/index.ts index bf9e019..dd25cf9 100644 --- a/src/index.ts +++ b/src/index.ts @@ -61,16 +61,12 @@ app.post('/interaction', bodyParse(), async(c) => { } if (interaction.type === InteractionType.ApplicationCommand && interaction.data.type === ApplicationCommandType.ChatInput) { - try { - return await Commands.get(interaction.data.name).run(new CommandContext( - c, - interaction.member, - interaction.data.options, - interaction.data.resolved - )); - } catch(e) { - console.log(e); - } + return await Commands.get(interaction.data.name).run(new CommandContext( + c, + interaction.member, + interaction.data.options, + interaction.data.resolved + )); } return new CommandContext(c).respond({