diff --git a/apps/test-bot/package.json b/apps/test-bot/package.json index f64bb21c..8ee571c8 100644 --- a/apps/test-bot/package.json +++ b/apps/test-bot/package.json @@ -10,7 +10,7 @@ "node": "node" }, "dependencies": { - "@ai-sdk/google": "^1.2.19", + "@ai-sdk/google": "^2.0.8", "@commandkit/ai": "workspace:*", "@commandkit/cache": "workspace:*", "@commandkit/devtools": "workspace:*", diff --git a/apps/website/docs/guide/01-getting-started/02-setup-commandkit.mdx b/apps/website/docs/guide/01-getting-started/02-setup-commandkit.mdx index 61385b82..25c7a724 100644 --- a/apps/website/docs/guide/01-getting-started/02-setup-commandkit.mdx +++ b/apps/website/docs/guide/01-getting-started/02-setup-commandkit.mdx @@ -1,7 +1,6 @@ --- title: Setup CommandKit -description: - Setup a new CommandKit project using the create-commandkit CLI +description: Setup a new CommandKit project using the create-commandkit CLI --- :::info diff --git a/apps/website/docs/guide/02-commands/02-command-options-autocomplete.mdx b/apps/website/docs/guide/02-commands/02-command-options-autocomplete.mdx index 7768b225..259f1689 100644 --- a/apps/website/docs/guide/02-commands/02-command-options-autocomplete.mdx +++ b/apps/website/docs/guide/02-commands/02-command-options-autocomplete.mdx @@ -47,9 +47,7 @@ const pets = Array.from({ length: 20 }, (_, i) => ({ value: `petId_${i}`, })); -export const autocomplete: AutocompleteCommand = async ({ - interaction, -}) => { +export const autocomplete: AutocompleteCommand = async ({ interaction }) => { try { // Get the input value of your autocomplete option const input = interaction.options.getString('name', false); @@ -69,9 +67,7 @@ export const autocomplete: AutocompleteCommand = async ({ } }; -export const chatInput: ChatInputCommand = async ({ - interaction, -}) => { +export const chatInput: ChatInputCommand = async ({ interaction }) => { const chosenPetId = interaction.options.getString('name', true); const chosenPet = pets.find((pet) => pet.value === chosenPetId); diff --git a/apps/website/docs/guide/02-commands/03-context-menu-commands.mdx b/apps/website/docs/guide/02-commands/03-context-menu-commands.mdx index a6a9eb53..9194aad0 100644 --- a/apps/website/docs/guide/02-commands/03-context-menu-commands.mdx +++ b/apps/website/docs/guide/02-commands/03-context-menu-commands.mdx @@ -20,10 +20,7 @@ understanding the nature of these context menu commands easier. ## Message context menu command ```ts title="src/app/commands/report-message.ts" -import type { - CommandData, - MessageContextMenuCommand, -} from 'commandkit'; +import type { CommandData, MessageContextMenuCommand } from 'commandkit'; import { MessageFlags } from 'discord.js'; export const command: CommandData = { diff --git a/apps/website/docs/guide/02-commands/05-after-function.mdx b/apps/website/docs/guide/02-commands/05-after-function.mdx index 5b8233d5..71571101 100644 --- a/apps/website/docs/guide/02-commands/05-after-function.mdx +++ b/apps/website/docs/guide/02-commands/05-after-function.mdx @@ -10,11 +10,7 @@ cleanup tasks. ## Usage ```ts title="src/app/commands/ping.ts" -import { - type CommandData, - type ChatInputCommand, - after, -} from 'commandkit'; +import { type CommandData, type ChatInputCommand, after } from 'commandkit'; export const command: CommandData = {}; diff --git a/apps/website/docs/guide/02-commands/07-middlewares.mdx b/apps/website/docs/guide/02-commands/07-middlewares.mdx index 6c22bb8a..d1466807 100644 --- a/apps/website/docs/guide/02-commands/07-middlewares.mdx +++ b/apps/website/docs/guide/02-commands/07-middlewares.mdx @@ -21,9 +21,7 @@ import { MiddlewareContext } from 'commandkit'; export function beforeExecute(ctx: MiddlewareContext) { // This function will be executed before the command is executed - console.log( - `User ${ctx.interaction.user.id} is about to execute a command`, - ); + console.log(`User ${ctx.interaction.user.id} is about to execute a command`); } export function afterExecute(ctx: MiddlewareContext) { @@ -68,9 +66,7 @@ import type { MiddlewareContext } from 'commandkit'; export function beforeExecute(ctx: MiddlewareContext) { // This middleware will run before any moderation command if (!ctx.interaction.member.permissions.has('KickMembers')) { - throw new Error( - 'You need moderation permissions to use this command', - ); + throw new Error('You need moderation permissions to use this command'); } } ``` diff --git a/apps/website/docs/guide/03-events/01-discordjs-events.mdx b/apps/website/docs/guide/03-events/01-discordjs-events.mdx index 8bb486e2..d6c974da 100644 --- a/apps/website/docs/guide/03-events/01-discordjs-events.mdx +++ b/apps/website/docs/guide/03-events/01-discordjs-events.mdx @@ -106,10 +106,7 @@ Some Discord.js events have multiple parameters, such as the ```ts title="src/app/events/messageUpdate/log-message-update.ts" import type { EventHandler } from 'commandkit'; -const handler: EventHandler<'messageUpdate'> = ( - oldMessage, - newMessage, -) => { +const handler: EventHandler<'messageUpdate'> = (oldMessage, newMessage) => { console.log( `Message from ${oldMessage.author?.username} updated: ${oldMessage.content} -> ${newMessage.content}`, ); @@ -135,9 +132,7 @@ const handler: EventHandler<'messageCreate'> = ( client, commandkit, ) => { - console.log( - `Message from ${message.author.username}: ${message.content}`, - ); + console.log(`Message from ${message.author.username}: ${message.content}`); }; export default handler; @@ -171,9 +166,7 @@ export default handler; import type { EventHandler } from 'commandkit'; const handler: EventHandler<'messageCreate'> = (message) => { - console.log( - `Message from ${message.author.username}: ${message.content}`, - ); + console.log(`Message from ${message.author.username}: ${message.content}`); }; export default handler; diff --git a/apps/website/docs/guide/04-jsx-components/01-using-jsx.mdx b/apps/website/docs/guide/04-jsx-components/01-using-jsx.mdx index 42899fcf..5b832d94 100644 --- a/apps/website/docs/guide/04-jsx-components/01-using-jsx.mdx +++ b/apps/website/docs/guide/04-jsx-components/01-using-jsx.mdx @@ -40,12 +40,7 @@ builders: ## Example usage ```tsx -import { - Container, - TextDisplay, - ActionRow, - Button, -} from 'commandkit'; +import { Container, TextDisplay, ActionRow, Button } from 'commandkit'; import { ButtonStyle } from 'discord.js'; const message = ( diff --git a/apps/website/docs/guide/04-jsx-components/02-discord-components-v1/01-action-row.mdx b/apps/website/docs/guide/04-jsx-components/02-discord-components-v1/01-action-row.mdx index 64cbe406..b284bb9e 100644 --- a/apps/website/docs/guide/04-jsx-components/02-discord-components-v1/01-action-row.mdx +++ b/apps/website/docs/guide/04-jsx-components/02-discord-components-v1/01-action-row.mdx @@ -10,9 +10,7 @@ components like buttons and select menus together in a single row. ```tsx title="src/app/commands/example.tsx" import { type ChatInputCommand, ActionRow, Button } from 'commandkit'; -export const chatInput: ChatInputCommand = async ({ - interaction, -}) => { +export const chatInput: ChatInputCommand = async ({ interaction }) => { const row = ( @@ -37,9 +35,7 @@ import { StringSelectMenuOption, } from 'commandkit'; -export const chatInput: ChatInputCommand = async ({ - interaction, -}) => { +export const chatInput: ChatInputCommand = async ({ interaction }) => { const row = ( @@ -65,9 +61,7 @@ components: import { type ChatInputCommand, ActionRow, Button } from 'commandkit'; import { ButtonStyle } from 'discord.js'; -export const chatInput: ChatInputCommand = async ({ - interaction, -}) => { +export const chatInput: ChatInputCommand = async ({ interaction }) => { const firstRow = ( @@ -36,9 +34,7 @@ Discord provides several button styles that you can import from the import { type ChatInputCommand, ActionRow, Button } from 'commandkit'; import { ButtonStyle } from 'discord.js'; -export const chatInput: ChatInputCommand = async ({ - interaction, -}) => { +export const chatInput: ChatInputCommand = async ({ interaction }) => { const buttons = (