-
Notifications
You must be signed in to change notification settings - Fork 228
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
multi command #2480
base: master
Are you sure you want to change the base?
multi command #2480
Conversation
Co-authored-by: Van Nguyen <36019388+nguyentvan7@users.noreply.github.com>
Co-authored-by: Van Nguyen <36019388+nguyentvan7@users.noreply.github.com>
Co-authored-by: Van Nguyen <36019388+nguyentvan7@users.noreply.github.com>
list forum threads from multi-opt channel
const text = focus.value.toLowerCase() | ||
reply = Object.keys(multilist) | ||
.filter((e) => e.toLowerCase().includes(text)) | ||
.slice(0, 25) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sort then slice?
const cacheDuration = 1000 * 60 * 60 | ||
let cacheTime = Date.now() - cacheDuration | ||
|
||
async function getMultis(client: Client) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: this is more of a refreshMultis
or something
const name = interaction.options.getString('name', true) | ||
const threadId = multilist[name] | ||
if (threadId) { | ||
interaction.reply(`[${name} multi-opts](${threadLink}${threadId})`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
interaction.reply(`[${name} multi-opts](${threadLink}${threadId})`) | |
interaction.reply(`[${name} Community Multi-Opt Thread](${threadLink}${threadId})`) |
|
||
const threadLink = 'https://discord.com/channels/785153694478893126/' | ||
|
||
export async function run(interaction: ChatInputCommandInteraction) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could consider making this an embed and using the image attached to the initial post as a thumbnail? To make it look nicer
can also be a future PR
Describe your changes
add
/multi
that sends a link to the selected character's thread in the multi-opt forum channelIssue or discord link
https://discord.com/channels/785153694478893126/1220796004442312807/1271371201519816830
Testing/validation
Checklist before requesting a review (leave this PR as draft if any part of this list is not done.)
yarn run mini-ci
locally to validate format and lint.