Skip to content

Commit

Permalink
Add shorter aliases for federation commands
Browse files Browse the repository at this point in the history
Signed-off-by: ATechnoHazard <[email protected]>
  • Loading branch information
ATechnoHazard committed Jun 19, 2019
1 parent 5f79f5b commit 1ad9977
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions go_bot/modules/feds/feds.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,11 +202,22 @@ func LoadFeds(u *gotgbot.Updater) {
u.Dispatcher.AddHandler(handlers.NewCommand("chatfed", chatFed))
u.Dispatcher.AddHandler(handlers.NewArgsCommand("joinfed", joinFed))
u.Dispatcher.AddHandler(handlers.NewCommand("leavefed", leaveFed))

u.Dispatcher.AddHandler(handlers.NewArgsCommand("fedpromote", fedPromote))
u.Dispatcher.AddHandler(handlers.NewArgsCommand("feddemote", fedDemote))
u.Dispatcher.AddHandler(handlers.NewArgsCommand("fedinfo", fedInfo))
u.Dispatcher.AddHandler(handlers.NewArgsCommand("fedadmins", fedAdmins))
u.Dispatcher.AddHandler(handlers.NewArgsCommand("fedban", fedBan))
u.Dispatcher.AddHandler(handlers.NewArgsCommand("unfedban", unfedban))

// Shorter aliases
u.Dispatcher.AddHandler(handlers.NewArgsCommand("fpromote", fedPromote))
u.Dispatcher.AddHandler(handlers.NewArgsCommand("fdemote", fedDemote))
u.Dispatcher.AddHandler(handlers.NewArgsCommand("finfo", fedInfo))
u.Dispatcher.AddHandler(handlers.NewArgsCommand("fadmins", fedAdmins))
u.Dispatcher.AddHandler(handlers.NewArgsCommand("fban", fedBan))
u.Dispatcher.AddHandler(handlers.NewArgsCommand("unfban", unfedban))


u.Dispatcher.AddHandler(handlers.NewMessage(Filters.All, fedCheckBan))
}

0 comments on commit 1ad9977

Please sign in to comment.