mirror of
https://github.com/prosolis/gogobee.git
synced 2026-07-15 08:32:41 +00:00
Rewrite from TypeScript to Go
Complete rewrite of the Freebee Matrix bot as GogoBee using mautrix-go. - E2EE with goolm (pure Go, no CGo/libolm) and cross-signing bootstrap - 35+ plugins with dependency injection and ordered registration - SQLite storage via modernc.org/sqlite (no CGo) - Scheduler via robfig/cron for WOTD, holidays, birthdays, releases, etc. - Optional LLM integration (Ollama) for sentiment, profanity, roasts, vibes - Threaded trivia, three-tier profanity tracking, WOTD usage verification - Multi-country holiday support with deduplication - Quadratic XP curve, configurable bot display name, encrypted DMs Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
48
internal/plugin/shade.go
Normal file
48
internal/plugin/shade.go
Normal file
@@ -0,0 +1,48 @@
|
||||
package plugin
|
||||
|
||||
import (
|
||||
"os"
|
||||
|
||||
"maunium.net/go/mautrix"
|
||||
)
|
||||
|
||||
// ShadePlugin is a stub plugin for future shade/roast features.
|
||||
type ShadePlugin struct {
|
||||
Base
|
||||
enabled bool
|
||||
}
|
||||
|
||||
// NewShadePlugin creates a new shade plugin.
|
||||
func NewShadePlugin(client *mautrix.Client) *ShadePlugin {
|
||||
return &ShadePlugin{
|
||||
Base: NewBase(client),
|
||||
enabled: os.Getenv("FEATURE_SHADE") == "true" || os.Getenv("FEATURE_SHADE") == "1",
|
||||
}
|
||||
}
|
||||
|
||||
func (p *ShadePlugin) Name() string { return "shade" }
|
||||
|
||||
func (p *ShadePlugin) Commands() []CommandDef {
|
||||
if !p.enabled {
|
||||
return nil
|
||||
}
|
||||
return []CommandDef{
|
||||
{Name: "shade", Description: "Throw some shade (coming soon)", Usage: "!shade", Category: "LLM & Sentiment"},
|
||||
}
|
||||
}
|
||||
|
||||
func (p *ShadePlugin) Init() error { return nil }
|
||||
|
||||
func (p *ShadePlugin) OnReaction(_ ReactionContext) error { return nil }
|
||||
|
||||
func (p *ShadePlugin) OnMessage(ctx MessageContext) error {
|
||||
if !p.enabled {
|
||||
return nil
|
||||
}
|
||||
|
||||
if p.IsCommand(ctx.Body, "shade") {
|
||||
return p.SendReply(ctx.RoomID, ctx.EventID, "Coming soon.")
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
Reference in New Issue
Block a user