-
Notifications
You must be signed in to change notification settings - Fork 2
ZYancey/CSBot/10/Tagging #416
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
base: zyancey/CSBot/18/Smite
Are you sure you want to change the base?
Conversation
| data: { | ||
| guildId, | ||
| name: name.toLowerCase(), | ||
| content, |
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.
Rather than storing the tag content URL as-is, we should probably download the image data and store it somewhere (in the database or some file) to send later. This way we aren't relying on ephemeral hotlinks that may disappear or expire later at any time.
I'm not sure about text tags, but if we want arbitrary strings as well, then we can do both probably, somehow.
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.
There is a way to launch a modal interaction with a file upload option, which might be useful: https://discordjs.guide/legacy/interactions/modals#file-upload
For example, /tag add could take no options, and instead launch a modal with a name field and a file input, as well as a field for alt text
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.
But anyway, in general I feel weird about allowing arbitrary text input in our first version of this, mainly because relying on external services is scary lol. I'd much prefer we limit the types of things that tags can be used for (only images/GIFs for now, since iirc that was all Ze-Kaiser supported) and download the data ourselves to serve when /tag send is invoked.
| .setDescription('Manage and use tagged images/links') | ||
| .addSubcommand(subcommand => | ||
| subcommand | ||
| .setName(AddSubcommand) |
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.
Should /tag add and /tag remove be usable by non-admin users?
/tag ( add / send / preview / list / remove )
Manage and use tagged images and links within your server. Tags are server-specific and tracked with usage statistics.
Tag names support autocomplete for easy discovery.