Skip to content

Commit

Permalink
chore: format
Browse files Browse the repository at this point in the history
  • Loading branch information
ghostdevv committed Oct 29, 2024
1 parent 83bbfb3 commit 4733c9b
Show file tree
Hide file tree
Showing 10 changed files with 283 additions and 283 deletions.
3 changes: 0 additions & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,5 @@
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
},
"[json]": {
"editor.defaultFormatter": "vscode.json-language-features"
}
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@
"npm": "forbidden, use pnpm",
"node": "^22.10.0"
}
}
}
4 changes: 2 additions & 2 deletions src/commands/docs/tutorial.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ export default command({
top_result
? wrap_in_embed(
`Have you gone through the tutorial page on ${top_result}?`,
)
)
: {
content: `No matching result found. Try again with a different search term.`,
ephemeral: true,
},
},
);
},

Expand Down
12 changes: 6 additions & 6 deletions src/commands/tags/_tags_create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ export const tag_create_handler: TagCRUDHandler = async ({
const fault = !has_any_role_or_id(member, TAG_CREATE_PERMITTED_IDS)
? "You don't have the permissions to create a tag."
: !validator_regex.test(tag_name)
? `The name provided isn't valid. It must match \`${validator_regex.source}\``
: (await get_tag(tag_name))
? 'A tag with that name exists already. Did you mean to do `/tags update` instead?'
: null;
? `The name provided isn't valid. It must match \`${validator_regex.source}\``
: (await get_tag(tag_name))
? 'A tag with that name exists already. Did you mean to do `/tags update` instead?'
: null;

if (fault !== null) {
await interaction.reply({
Expand Down Expand Up @@ -74,14 +74,14 @@ export const tag_create_handler: TagCRUDHandler = async ({
error
? {
content: `There was an error in creating the tag "${tag_name}". Tag names are case insensitive and should be unique.`,
}
}
: {
content: `Added tag "${tag_name}".`,
embeds: tags_embed_builder({
tag_name,
tag_content: content,
author: member,
}),
},
},
);
};
8 changes: 4 additions & 4 deletions src/commands/tags/_tags_update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ export const tag_update_handler: TagCRUDHandler = async ({
const fault = !tag
? 'No tag with that name exists. Did you mean to do `/tags create` instead?'
: interaction.user.id !== tag.author_id
? "You don't have the permissions to edit that tag. You have to be the author of the tag."
: null;
? "You don't have the permissions to edit that tag. You have to be the author of the tag."
: null;

if (fault !== null) {
await interaction.reply({
Expand Down Expand Up @@ -71,14 +71,14 @@ export const tag_update_handler: TagCRUDHandler = async ({
error
? {
content: `Failed to update tag "${tag_name}."`,
}
}
: {
content: `Tag "${tag_name}" was successfully updated.`,
embeds: tags_embed_builder({
tag_name,
tag_content: content,
author: await get_member(interaction, tag.author_id),
}),
},
},
);
};
2 changes: 1 addition & 1 deletion src/commands/thread/stats.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export default command({
wrap_in_embed(
data?.count
? // prettier-ignore
`<@${user_id}> has solved ${data.count} thread${data.count === 1 ? '' : 's'}. Thank you for your contribution.`
`<@${user_id}> has solved ${data.count} thread${data.count === 1 ? '' : 's'}. Thank you for your contribution.`
: `<@${user_id}> has not solved any threads yet.`,
),
);
Expand Down
12 changes: 6 additions & 6 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export const SOLVED_TAGS_MAP: Record<string, string> = DEV_MODE

// Ecosystem
'1060332203571151019': '1060930530566217888',
};
};

export const HELP_CHANNELS = new Set(Object.keys(SOLVED_TAGS_MAP));

Expand All @@ -86,7 +86,7 @@ export const LINK_ONLY_CHANNELS = DEV_MODE

// #both-both-is-good
'919196322303725568',
]
]
: COMMUNITY_CHANNELS;

export const AUTO_THREAD_CHANNELS = DEV_MODE
Expand All @@ -96,9 +96,9 @@ export const AUTO_THREAD_CHANNELS = DEV_MODE

// #both-both-is-good
'919196322303725568',
]
]
: [
...COMMUNITY_CHANNELS,
'640884695890133012', // jobs
];
...COMMUNITY_CHANNELS,
'640884695890133012', // jobs
];
// #endregion
Loading

0 comments on commit 4733c9b

Please sign in to comment.