devOS-Sanity-Edition / yiski

a devOS discord bot
http://yiski.devos.one/
MIT License
1 stars 0 forks source link

Parsing Help command contents into a seperate TOML file #10

Open ghost opened 2 years ago

ghost commented 2 years ago

Probably would help add commands to the list a lot more easily, than trying to flood Discord help.py and Revolt help.py

ghost commented 2 years ago

I guess here's an example of what could work

[hello]
name = "Hello"
desc = "Hello Command"
syntax = "{botPrefix}hello"

[httpcat]
name = "HTTP Cat"
desc = "Hello Command"
syntax = "{botPrefix}httpcat [http code]"

[ghr]
name = "GitHub Repos"
desc = "Preview GitHub Repo's Details"
syntax = "{botPrefix}ghr [org/username] [repo name]"

[memoryleak]
name = "Memory Leak"
desc = "Funni Memory Leak video go brrr"
syntax = "{botPrefix}memoryleak"

[gasp]
name = "Gasp"
desc = "Just find out for yourself..."
syntax = "{botPrefix}gasp"

[token]
name = "Token Leak"
desc = "So about that funky config.toml..."
syntax = "{botPrefix}token"

[devtools]
name = "Discord Devtools"
desc = "Discord disabled Dev Tools by default now, here's how to get it back"
syntax = "{botPrefix}devtools"

[headcrab]
name = "Headcrab"
desc = "Do you just... want someone to perish? Throw a headcrab at them!"
syntax = "{botPrefix}headcrab [@username]"
asoji commented 3 months ago

There's... probably a better way of doing this. There might be a way to get all the contents from the annotations I use. I believe Storm has pointed out a way to do this but I don't remember.