Skip to content

Commit

Permalink
Update settings.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
cobaltt7 authored Oct 28, 2024
1 parent 80000ff commit f4e7f71
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ defineChatCommand(

async function settingsCommand(
interaction: RepliableInteraction,
options: Record<CamelToKebab<keyof typeof SETTINGS>, boolean | undefined>,
options: Partial<Record<CamelToKebab<keyof typeof SETTINGS>, boolean | undefined>>,
): Promise<void> {
const newOptions = Object.fromEntries(
Object.entries(options).map(([option, value]) => [
Expand All @@ -149,7 +149,7 @@ async function settingsCommand(
}
export async function updateSettings(
user: User,
settings: { [key in keyof typeof SETTINGS]?: boolean | "toggle" },
settings: Partial<Record<keyof typeof SETTINGS, boolean | "toggle" | undefined>>,
): Promise<InteractionReplyOptions> {
const old = await getSettings(user);
const updated = {
Expand Down

0 comments on commit f4e7f71

Please sign in to comment.