From 93cfc0ddfba4b83f88fcb8257d3015f097b147d5 Mon Sep 17 00:00:00 2001 From: Chris Sexton <3216719+chrissexton@users.noreply.github.com> Date: Sat, 23 Jul 2022 00:19:15 -0400 Subject: [PATCH] cowboy: optionally disable overlay command for now --- plugins/cowboy/cowboy.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plugins/cowboy/cowboy.go b/plugins/cowboy/cowboy.go index 3231862..3685448 100644 --- a/plugins/cowboy/cowboy.go +++ b/plugins/cowboy/cowboy.go @@ -115,6 +115,11 @@ func (p *Cowboy) registerCmds(d *discord.Discord) { if err := d.RegisterSlashCmd(cmd, p.mkOverlayCB(hat)); err != nil { log.Error().Err(err).Msg("could not register cowboy command") } + + if p.c.GetInt("cowboy.overlaysEnabled", 0) == 0 { + return + } + cmd = discordgo.ApplicationCommand{ Name: "overlay", Description: "overlay-ify an emojy",