Skip to content

Commit

Permalink
fix: autopin requires 5 instead of 1
Browse files Browse the repository at this point in the history
  • Loading branch information
lcox74 committed Apr 8, 2024
1 parent 039b491 commit f8b3d4d
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 20 deletions.
9 changes: 9 additions & 0 deletions applications/autopin/app.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package autopin

import "github.com/aussiebroadwan/tony/framework"

const autopinThreshold = 5

func RegisterAutopinApp(bot *framework.Bot) framework.Route {
return framework.NewRoute(bot, "autopin", &AutopinApp{})
}
8 changes: 1 addition & 7 deletions applications/autopin/autopin.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,8 @@ package autopin

import "github.com/aussiebroadwan/tony/framework"

const autopinThreshold = 1

func RegisterAutopinApp(bot *framework.Bot) framework.Route {
return framework.NewRoute(bot, "autopin", &AutopinApp{})
}

// AutoPinRule is a rule that automatically pins messages that are reacted to
// with a pin emoji 📌 at least 5 times.
// with a pin emoji 📌 at least x times.
type AutopinApp struct {
framework.ApplicationReaction
}
Expand Down
16 changes: 16 additions & 0 deletions applications/remind/app.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package remind

import "github.com/aussiebroadwan/tony/framework"

func RegisterRemindApp(bot *framework.Bot) framework.Route {
return framework.NewRoute(bot, "remind",
// remind
&RemindCommand{}, // [NOP]

// remind <subcommand>
framework.NewRoute(bot, "add", &RemindAddSubCommand{}),
framework.NewRoute(bot, "del", &RemindDeleteSubCommand{}),
framework.NewRoute(bot, "list", &RemindListSubCommand{}),
framework.NewRoute(bot, "status", &RemindStatusSubCommand{}),
)
}
13 changes: 0 additions & 13 deletions applications/remind/remind_command.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,6 @@ import (
"github.com/bwmarrin/discordgo"
)

func RegisterRemindApp(bot *framework.Bot) framework.Route {
return framework.NewRoute(bot, "remind",
// remind
&RemindCommand{}, // [NOP]

// remind <subcommand>
framework.NewRoute(bot, "add", &RemindAddSubCommand{}),
framework.NewRoute(bot, "del", &RemindDeleteSubCommand{}),
framework.NewRoute(bot, "list", &RemindListSubCommand{}),
framework.NewRoute(bot, "status", &RemindStatusSubCommand{}),
)
}

type RemindCommand struct {
framework.ApplicationCommand
}
Expand Down

0 comments on commit f8b3d4d

Please sign in to comment.