From b66038354a39e0b970d708365e07a1455795f051 Mon Sep 17 00:00:00 2001 From: Chris Sexton <3216719+chrissexton@users.noreply.github.com> Date: Tue, 27 Feb 2024 21:40:19 -0500 Subject: [PATCH] meme: finishing up templating --- connectors/discord/discord.go | 3 + plugins/emojy/list.html | 107 -------------------------------- plugins/emojy/stats.html | 113 ---------------------------------- plugins/emojy/web.go | 45 ++++++++++---- plugins/meme/meme_templ.go | 30 ++++----- 5 files changed, 52 insertions(+), 246 deletions(-) delete mode 100644 plugins/emojy/list.html delete mode 100644 plugins/emojy/stats.html diff --git a/connectors/discord/discord.go b/connectors/discord/discord.go index 66834a6..b81ea9c 100644 --- a/connectors/discord/discord.go +++ b/connectors/discord/discord.go @@ -431,6 +431,9 @@ func (d *Discord) SetRole(userID, roleID string) error { type CmdHandler func(s *discordgo.Session, i *discordgo.InteractionCreate) func (d *Discord) RegisterSlashCmd(c discordgo.ApplicationCommand, handler CmdHandler) error { + if !d.config.GetBool("registerSlash", true) { + return nil + } cmd, err := d.client.ApplicationCommandCreate(d.client.State.User.ID, d.guildID, &c) d.cmdHandlers[c.Name] = handler if err != nil { diff --git a/plugins/emojy/list.html b/plugins/emojy/list.html deleted file mode 100644 index a32eaa5..0000000 --- a/plugins/emojy/list.html +++ /dev/null @@ -1,107 +0,0 @@ - - -
- - - - - - - - - - - - -") + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\">
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err }