Compare commits
4 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
788c2b197b | |
|
|
9c5b9995ec | |
|
|
61e20e914f | |
|
|
b371f50a0e |
|
|
@ -1,2 +1,7 @@
|
||||||
# framework
|
## framework
|
||||||
A discordgo bot framework with argument parsing, typeguards, and a few other cool tricks. Documentation coming soon:tm:
|
|
||||||
|

|
||||||
|
[](https://github.com/qpixel/framework/stargazers)
|
||||||
|
[](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:
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
2
util.go
2
util.go
|
|
@ -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]
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue