Compare commits

...

4 Commits
v0.2.0 ... main

Author SHA1 Message Date
Pixel 788c2b197b remove archive message 2021-12-28 04:25:40 +00:00
vel 9c5b9995ec
archive message 2021-08-30 21:02:15 -07:00
vel 61e20e914f
Minor bug fixes 2021-08-22 12:03:45 -07:00
vel b371f50a0e
[skip ci] update README.md 2021-08-21 21:33:07 -07:00
3 changed files with 11 additions and 3 deletions

View File

@ -1,2 +1,7 @@
# framework ## framework
A discordgo bot framework with argument parsing, typeguards, and a few other cool tricks. Documentation coming soon:tm:
![license](https://img.shields.io/github/license/qpixel/framework)
[![GitHub stars](https://img.shields.io/github/stars/qpixel/framework)](https://github.com/qpixel/framework/stargazers)
[![Go Reference](https://pkg.go.dev/badge/github.com/qpixel/framework.svg)](https://pkg.go.dev/github.com/qpixel/framework)
A discordgo bot framework with argument parsing, argument typesafety, slash command support, and some QOL message response code. Documentation coming soon:tm:

View File

@ -269,6 +269,9 @@ func findAllOptionArgs(argString []string, keys []string, infoArgs *orderedmap.O
continue continue
} }
vv := iA.(*ArgInfo) vv := iA.(*ArgInfo)
if vv.Match == ArgContent {
return *args, true, argString, keys
}
if vv.Required { if vv.Required {
if vv.TypeGuard != String { if vv.TypeGuard != String {
var value string var value string

View File

@ -35,7 +35,7 @@ func RemoveItems(slice []string, indexes []int) []string {
} }
copy(newSlice, slice) copy(newSlice, slice)
for _, v := range indexes { for _, v := range indexes {
if len(newSlice) > v+1 && v != 0 { if len(newSlice) < v+1 && v != 0 {
v = v - 1 v = v - 1
} }
//newSlice[v] = newSlice[len(newSlice)-1] //newSlice[v] = newSlice[len(newSlice)-1]