-
Notifications
You must be signed in to change notification settings - Fork 1
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
A bot command to fork a thread #34
Comments
|
…s, since there's not a tagged release yet that does. Part of #34.
Because it's a global command, not a guild command, it might take up to an hour for it to actually show up for use in guilds. I THINK it worked but can't tell yet because of that. This will require re-authing the bot on your channel as it also requires application.command oauth scope. Part of #34.
… or env var `DEBUG_GUILD_ID`. This reveals that the command was failing to register with a permissions error in the last commit. (But I guess it doesn't show the error because it wasn't clear that ANY guild actually wanted it). Part of #34.
It's currently just a no-op ACK but at least now there isn't an error show in the discord chat client to the invoking user. Part of #34.
Well darn it, looks like slash commands are not legal to issue in the UI when responding to a message, and there's no type of field in a slash command for a given message ID. So we'll need to figure out a different interaction pattern than replying to a message you want to use as an OP with the '/fork' command. This machinery with slash commands is useful, so I don't want to get rid of. Maybe have an |
* fork-thread-command: Make the main interaction be an /archive action. Part of #34. Fixes #36. Define getThreadGroupInfoForThread and reimplement isThread in terms of it. Part of #34. The bot does an interaction response (as required) for the command fork. Fix the permissions error for the slash command bot. Allow setting a specific guild ID to debug with via `-debug-guild-id` or env var `DEBUG_GUILD_ID`. Make a stub 'fork' command that doesn't actually do anything yet. Use a specific version of discordgo module that supports SlashCommands, since there's not a tagged release yet that does. Part of #34.
… do antyhing, but will help disable this feature in production in the future if desired. Part of #34.
…s if disableEmojiFork is true. Part of #34. Currently just outputs an ACK message.
…-coded TEMP_FORK_CHANNEL. Part of #34.
…en forked from which other ones (backward references). We also keep track of those changes live as they happen, although those are currently not saved out regularly. Part of #34.
…annelID + messageID to be able to fetch them. Introduce notion of packedMessageReference which is a simple string that puts `channelID+messageID` and can be unpacked for storing in JSON. Part of #34.
…e IDF cache is modified and immediately persisted. Part of #34.
…s a field in the embed. Part of #34.
… we don't persist the in-memory IDF. In-memory IDFs might get kind of wonky (e.g. message edits, etc). The canonical way to generate them is to rebuild from scratch, which still happens on a timer. We'll need the IDFs to be around and convienent to check on message reaction if there's a forked message to update. Part of #34.
…rnal timestamp to figure out if it needs to be regenerated. This will allow forked indexes to be persisted without messing with the logic for when a full regeneration is necessary. Part of #34.
…ile. This allows noted forked messages to be peristed, otherwise until the rebuild of the IDF happened after a bot shutdown the forked messages would be forgotten about. Part of #34.
…e within 5 minutes, but reqpeated calls will still only have one. Part of #34.
Before, if a forked message came in after an IDF cache was created, and the bot was killed and restarted, then the bot wouldn't know about the forked message until the IDF cache was rebuilt. Now it should be way less likely for the IDF Cache to not include MOST forked messages (although you could still have one come in in the moment the bot was down, which wouldn't be noticed until the next reindexing). Part of #34.
…i reactions on the forked versions, too. Part of #34.
…link to the channel it was forked to. Part of #34.
…use guildID wasn't passed. No idea why session.ChannelMessage isn't returning the guildID. Part of #34.
…turned message, and document why it exists. Part of #34.
… with that message. The thread is created in the wrong category right now. Part of #34.
…ween them, inclusive, up to 100 messages, will be forked too. Part of #34.
…sages before thread. Now it only copies the one unless there is a needle above it. Part of #34.
…wer total words seen then were asked for. Part of #34.
…d at some point. Introduce restErrorCode. Part of #34.
…eleted, so we don't try to update them when they don't exist. Not TOTALLY necessary since we handle that problem smoothly in updatedForkedMessages now, but better hygiene. Part of #34.
…nd informs the user they could have forked multiple messages if they used the needle emoji. Part of #34.
…the first time a message gets a fork (or rather, when it passes from 0 to 1, which could theoretically happen multiple times.) Part of #34.
If someone replies to any message in any channel and uses the magic command, then the bot should create a new thread starting with the message that it's in reply to.
At the beginning, it will be a slash command reply that is in reply to the message that should be the new OP.
The thread OP should be a copy/paste of the message, with a link back to the original (using a channel reference, an actual link, and an @mention of the user).
In the future (once #35) is supported, when we can rename threads by tfidf words, then it should be possible to fork a thread merely by hitting the 🍴 emoji reaction on a post and have it auto named based on the contents of the OP.
Originally captured in #19
The text was updated successfully, but these errors were encountered: