• If you need help or want to discuss things, you now can also join us on our Discord Server!
  • A first preview of the unlimited version of SinusBot can be found in the Upcoming Changes thread. A version for Windows will follow, but we don't have a release date, yet.

2 new config options for script-makers

Relentless

Well-Known Member
Contributor
Hallo!

Ich finde es wäre schön für Script-Creator 2 neue Optionen für die Config zu haben.

Zum einen wäre ein Group-Selector cool. Sodass man ein Drop-Down-Menü mit Servergruppen hat. Ähnlich wie der Config-Option 'Channel'.
So müssten Nutzer nicht immer nach der Servergruppen-ID suchen, sondern könnten diese direkt auswählen. Natürlich würde das nur gehen,
wenn der Bot online ist aber so ist es bei dem Channel ja auch.

Das zweite Feature wäre eine Art Sektion. Dieses könnte man dann als Array oder Objekt auswerten.
Als Beispiel würden mir da Texte einfallen, die man im Script verändern kann. Anstelle von einem Haufen Text-Optionen, die man dann im
Config-Objekt hat, wäre es schöner dafür ein eigenes Objekt innerhalb des Config-Objekts zu haben.

Dies würde der einfacheren Verarbeitung von Config-Optionen dienen. Man könnte dieses Objekt dann auch gleich an die Hauptfunktion
übergeben, indem man das Config-Objekt destructured.

Beispielsweise so:
https://pastebin.com/PdPW31Ch

Natürlich geht das dann nicht nur mit Text, sondern man könnte auch andere Config-Optionen in Untergruppen packen. Ich fände das
sehr gut für Struktur und erleichterten Zugriff.

Greets,
Relentless :p
Hello!

Ich think it would be great to have 2 new config options for script creators.

First of all, a group selector would be nice. So you get a drop down menu of server groups. Similar to the config option 'channel'.
With that, users wouldn't have to search for the id of the server group. Instead, they could just select it from the menu. Of course, this
would only work if the bot is online but that's the same for the channel.

The second feature would be a section like thing. It could be used as an array or an object.
For example you could use it for phrases the user is able to edit in the script. Instead of a bunch of phrase options you would have in the
config object, it would be nicer to have a separate object.

This would grant an easier usage of the config options. You could pass this object right to the main function if you destructure the
config object.

Maybe like this:
https://pastebin.com/PdPW31Ch

Of course, this would not only work with text but with several options you could have in a sub category. I think that would be a nice
feature for better structure and usage.

Greets,
Relentless :p
 
Top