Skip to content
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

Open
wants to merge 18 commits into
base: master
Choose a base branch
from
Open

multi command #2480

wants to merge 18 commits into from

Conversation

Godlander
Copy link
Contributor

Describe your changes

add /multi that sends a link to the selected character's thread in the multi-opt forum channel

Issue or discord link

https://discord.com/channels/785153694478893126/1220796004442312807/1271371201519816830

Testing/validation

image

Checklist before requesting a review (leave this PR as draft if any part of this list is not done.)

  • I have commented my code in hard-to understand areas.
  • I have made corresponding changes to README or wiki.
  • For front-end changes, I have updated the corresponding English translations.
  • I have run yarn run mini-ci locally to validate format and lint.
  • If I have added a new library or app, I have updated the deployment scripts to ignore changes as needed

const text = focus.value.toLowerCase()
reply = Object.keys(multilist)
.filter((e) => e.toLowerCase().includes(text))
.slice(0, 25)
Copy link
Collaborator

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) {
Copy link
Collaborator

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})`)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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) {
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants