-
Notifications
You must be signed in to change notification settings - Fork 29
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
New/Better Slash Commands #162
base: main
Are you sure you want to change the base?
Conversation
Adding /set (which sets a user's elements to a query) and /take (which removes a user's elements which are contained in a query) Adding /cat addquery which adds the elements contained in a query to a category
Making new hintid and info elementid commands which use element id exclusively and changing the existing versions to use the names instead Making edit element command show id in news.
Adding back poll rejection DM
Adding distinct bool to idea which when false makes it so duplicate elements can appear in the idea Adding /random_combination which defaults to nondistinct and can give existing combinations Adding red circle to poll rejection DM Making it clear when marks, images and colors are new or changing an existing one in the channel message
shouldn't have committed this file previously
Actually fixing
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.
Lots of stuff needs fixing, but good job overall!
@@ -76,6 +76,15 @@ func (c *Categories) CatEditCmd(ctx sevcord.Ctx, cat string, elems []int, kind t | |||
// Respond | |||
ctx.Respond(sevcord.NewMessage(fmt.Sprintf(format, text, name))) | |||
} | |||
func (c *Categories) AddCatQuery(ctx sevcord.Ctx, opts []any) { |
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.
I implemented this before and people made categories with every element, which takes like hundreds of megabytes of space in the DB, which is why I deleted it. Encourage people to use queries instead of adding stuff from queries to categories
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.
Just wondering how big even is the DB anyway?
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.
What about if it was a mod only thing or had some sort of limits?
@@ -73,7 +73,14 @@ func (p *Pages) Init() { | |||
"Delete all the elements from a category!", | |||
p.categories.DelCat, | |||
sevcord.NewOption("category", "The category to delete!", sevcord.OptionKindString, true).AutoComplete(p.categories.Autocomplete), | |||
))) | |||
), sevcord.NewSlashCommand( | |||
"addquery", |
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.
Don't add this command 😭
guild, _ := dg.Guild(p.Guild) | ||
|
||
upvotetext := "upvotes" | ||
if p.Upvotes == 0 { |
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.
Shouldn't it be == 1
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.
It doesn't count the bot's upvote/downvote in that
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.
I guess I could write it as p.Upvotes+1==1 but that is the same thing as p.Upvotes==0
Making page be modifiable for all page-based slash commands (it's optional and if not provided it will be set to the first page)
changing it to say "the results" in the description of command
Per Nv7's suggestion
…/Nv7Haven into betterslashcommands
Making hint a slash command group with name and id as sub commands, fully changing "change" to "edit"
Making ping aliases
Making postfix tree size have commas for 1k+ tree size. Adding color, colorer and imager sorting options
merge main
Adding createdon query type which compares a unix timestamp to elements. Adding different emoji for each type of comparison
Making randomcombo be a variant of idea (uses the idea handler). Adding /search. There's currently 2 different types of searches (prefix and regex)
Making search 2 separate commands for the 2 types
Adding /set (which sets a user's elements to a query) and /take (which removes a user's elements which are contained in a query) Adding /cat addquery which adds the elements contained in a query to a category