!7 cmodule GazelleMultiBot > DynGazelleBot { class Bot { S name; *() {} *(S *name) {} *(S *name, IVF1 *handlePost) {} swappable void handlePost(GazellePost post) {} GazelleBotCred cred() { ret GazelleBotCred(_user, _botToken, name); } } transient new L bots; start { bots.add(new Bot("Math Bot", post -> gazelle_mathBot1_handlePost_2(_user, _botToken, post))); bots.add(new Bot("Code Safety Checker") { void handlePost(GazellePost post) { if (eqic(post.type, "JavaX Code")) gazelle_createPost(cred(), codeSafetyCheckResult(post.text), "Code Safety", refs := post.id); } }); } void handlePost(GazellePost post) { for (Bot bot : bots) pcall { bot.handlePost(post); } } }