QuiltServerTools / BlockBot

A Minecraft - Discord chat linking mod
Creative Commons Zero v1.0 Universal
27 stars 22 forks source link

Feature Request: An API to write different backends for different chat programs, possibly with some way to indicate what features that backend supports #14

Closed chexo3 closed 3 years ago

chexo3 commented 3 years ago

The idea is I'd be able to write another mod that would tell BlockBot what features it supports (IE, skins for avatars, embeds, etc.) and then configure BlockBot to use that backend instead of the built-in Discord one. This could be used for writing Slack, IRC, etc. bridges without having to modify BlockBot itself or write a mod from scratch.

Genau6502 commented 3 years ago

This should be implemented in c4e5347, let me know if you have any feedback for that change

chexo3 commented 3 years ago

I like how this is going! I would maybe have a section in the config file with a list of the built-in bot types, and options to enable or disable them. They'd then have their own configuration in a subfolder. Discord bot would be the only one enabled by default. It might also be helpful to have commands to list the registered bots, as well as a console-only command to delete the configuration files for unused bots, in case a server ends up having a lot of them. It's a dangerous command, so should be permission level 4 (same as /stop is)

Genau6502 commented 3 years ago

So I don't plan on official support for other platforms, but if anyone else wants to use the API, feel free

chexo3 commented 3 years ago

I guess that means only discord bot would be listed by default Sections for the other bots registered at launch should probably be added so they can be enabled or disabled.

Genau6502 commented 3 years ago

They can - in the BlockBot class bots can be registered. The idea is the mod handles config loading as they control the logic for the bot

chexo3 commented 3 years ago

Fair enough.