Skip to content

Commit

Permalink
style: format code with gofumpt (#381)
Browse files Browse the repository at this point in the history
Format code with gofumpt

This commit fixes the style issues introduced in f87d0aa according to the output
from gofumpt.

Details: https://app.deepsource.com/gh/divideprojects/Alita_Robot/transform/f7de32f9-3a54-4715-bb0d-cbe6012ac3fe/

Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
  • Loading branch information
deepsource-autofix[bot] authored Jun 11, 2023
1 parent f87d0aa commit aac7021
Show file tree
Hide file tree
Showing 21 changed files with 0 additions and 22 deletions.
1 change: 0 additions & 1 deletion alita/modules/admin.go
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,6 @@ func (m adminModuleStruct) adminCache(b *gotgbot.Bot, ctx *ext.Context) error {
}

func LoadAdmin(dispatcher *ext.Dispatcher) {

HelpModule.AbleMap.Store("Admin", true)

dispatcher.AddHandler(handlers.NewCommand("admin", adminModule.promote))
Expand Down
1 change: 0 additions & 1 deletion alita/modules/antiflood.go
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,6 @@ func (m *antifloodModuleStruct) setFloodDeleter(b *gotgbot.Bot, ctx *ext.Context
}

func LoadAntiflood(dispatcher *ext.Dispatcher) {

HelpModule.AbleMap.Store(antifloodModule.modname, true)

dispatcher.AddHandler(handlers.NewCommand("setflood", antifloodModule.setFlood))
Expand Down
1 change: 0 additions & 1 deletion alita/modules/bans.go
Original file line number Diff line number Diff line change
Expand Up @@ -1038,7 +1038,6 @@ func (m bansModuleStruct) unrestrictButtonHandler(b *gotgbot.Bot, ctx *ext.Conte
}

func LoadBans(dispatcher *ext.Dispatcher) {

HelpModule.AbleMap.Store(bansModule.modname, true)

// ban cmds
Expand Down
1 change: 0 additions & 1 deletion alita/modules/blacklists.go
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,6 @@ func (m blacklistsModuleStruct) blacklistWatcher(b *gotgbot.Bot, ctx *ext.Contex
}

func LoadBlacklists(dispatcher *ext.Dispatcher) {

HelpModule.AbleMap.Store(blacklistsModule.modname, true)

dispatcher.AddHandler(handlers.NewCommand("blacklists", blacklistsModule.listBlacklists))
Expand Down
1 change: 0 additions & 1 deletion alita/modules/bot_updates.go
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,6 @@ func setAdminCache(chatId, msgId int64) (interface{}, error) {
}

func LoadBotUpdates(dispatcher *ext.Dispatcher) {

dispatcher.AddHandlerToGroup(
handlers.NewMyChatMember(
func(u *gotgbot.ChatMemberUpdated) bool {
Expand Down
1 change: 0 additions & 1 deletion alita/modules/connections.go
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,6 @@ func (m connectionsModuleStruct) userCmdConnString() string {
}

func LoadConnections(dispatcher *ext.Dispatcher) {

// modules.helpModule.ableMap.Store(m.modname, true)

dispatcher.AddHandler(handlers.NewCommand("connect", ConnectionsModule.connect))
Expand Down
1 change: 0 additions & 1 deletion alita/modules/disabling.go
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,6 @@ func (m disablingModuleStruct) enable(b *gotgbot.Bot, ctx *ext.Context) error {
}

func LoadDisabling(dispatcher *ext.Dispatcher) {

HelpModule.AbleMap.Store(disablingModule.modname, true)

dispatcher.AddHandler(handlers.NewCommand("disable", disablingModule.disable))
Expand Down
1 change: 0 additions & 1 deletion alita/modules/filters.go
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,6 @@ func (m filtersModuleStruct) filtersWatcher(b *gotgbot.Bot, ctx *ext.Context) er
}

func LoadFilters(dispatcher *ext.Dispatcher) {

HelpModule.AbleMap.Store(filtersModule.modname, true)

HelpModule.helpableKb[filtersModule.modname] = [][]gotgbot.InlineKeyboardButton{
Expand Down
1 change: 0 additions & 1 deletion alita/modules/formatting.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@ func (m formattingModuleStruct) formattingHandler(b *gotgbot.Bot, ctx *ext.Conte
}

func LoadMkdCmd(dispatcher *ext.Dispatcher) {

HelpModule.AbleMap.Store(formattingModule.modname, true)
HelpModule.helpableKb[formattingModule.modname] = formattingModule.genFormattingKb()
cmdDecorator.MultiCommand(dispatcher, []string{"markdownhelp", "formatting"}, formattingModule.markdownHelp)
Expand Down
1 change: 0 additions & 1 deletion alita/modules/greetings.go
Original file line number Diff line number Diff line change
Expand Up @@ -714,7 +714,6 @@ func (m greetingsModuleStruct) setPendingJoins(chatId, userId int64) {
}

func LoadGreetings(dispatcher *ext.Dispatcher) {

HelpModule.AbleMap.Store(greetingsModule.modname, true)

// Adds Formatting kb button to Greetings Menu
Expand Down
1 change: 0 additions & 1 deletion alita/modules/language.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ func (m languagesModuleStruct) langBtnHandler(b *gotgbot.Bot, ctx *ext.Context)
}

func LoadLanguage(dispatcher *ext.Dispatcher) {

HelpModule.AbleMap.Store(languagesModule.modname, true)
HelpModule.helpableKb[languagesModule.modname] = languagesModule.genFullLanguageKb()

Expand Down
1 change: 0 additions & 1 deletion alita/modules/locks.go
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,6 @@ func (m locksModuleStruct) botLockHandler(b *gotgbot.Bot, ctx *ext.Context) erro
}

func LoadLocks(dispatcher *ext.Dispatcher) {

HelpModule.AbleMap.Store(locksModule.modname, true)

dispatcher.AddHandler(handlers.NewCommand("lock", locksModule.lockPerm))
Expand Down
2 changes: 0 additions & 2 deletions alita/modules/misc.go
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,6 @@ func (m miscModuleStruct) stat(b *gotgbot.Bot, ctx *ext.Context) error {
}

func LoadMisc(dispatcher *ext.Dispatcher) {

HelpModule.AbleMap.Store(miscModule.modname, true)

dispatcher.AddHandler(handlers.NewCommand("stat", miscModule.stat))
Expand All @@ -473,5 +472,4 @@ func LoadMisc(dispatcher *ext.Dispatcher) {
dispatcher.AddHandler(handlers.NewCommand("tr", miscModule.translate))
misc.AddCmdToDisableable("tr")
dispatcher.AddHandler(handlers.NewCommand("removebotkeyboard", miscModule.removeBotKeyboard))

}
1 change: 0 additions & 1 deletion alita/modules/mute.go
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,6 @@ func (m mutesModuleStruct) unmute(b *gotgbot.Bot, ctx *ext.Context) error {
}

func LoadMutes(dispatcher *ext.Dispatcher) {

HelpModule.AbleMap.Store(mutesModule.modname, true)

dispatcher.AddHandler(handlers.NewCommand("mute", mutesModule.mute))
Expand Down
1 change: 0 additions & 1 deletion alita/modules/notes.go
Original file line number Diff line number Diff line change
Expand Up @@ -717,7 +717,6 @@ func (m notesModuleStruct) sendNoFormatNote(b *gotgbot.Bot, ctx *ext.Context, re
}

func LoadNotes(dispatcher *ext.Dispatcher) {

HelpModule.AbleMap.Store(notesModule.modname, true)

HelpModule.helpableKb[notesModule.modname] = [][]gotgbot.InlineKeyboardButton{
Expand Down
1 change: 0 additions & 1 deletion alita/modules/pin.go
Original file line number Diff line number Diff line change
Expand Up @@ -761,7 +761,6 @@ func (m pinsModuleStruct) GetPinType(msg *gotgbot.Message) (fileid, text string,
}

func LoadPin(dispatcher *ext.Dispatcher) {

HelpModule.AbleMap.Store(pinsModule.modname, true)

dispatcher.AddHandler(handlers.NewCommand("unpin", pinsModule.unpin))
Expand Down
1 change: 0 additions & 1 deletion alita/modules/purges.go
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,6 @@ func (m purgesModuleStruct) purgeTo(bot *gotgbot.Bot, ctx *ext.Context) error {
}

func LoadPurges(dispatcher *ext.Dispatcher) {

HelpModule.AbleMap.Store(purgesModule.modname, true)

dispatcher.AddHandler(handlers.NewCommand("del", purgesModule.delCmd))
Expand Down
1 change: 0 additions & 1 deletion alita/modules/reports.go
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,6 @@ func (m reportsModuleStruct) markResolvedButtonHandler(b *gotgbot.Bot, ctx *ext.
}

func LoadReports(dispatcher *ext.Dispatcher) {

HelpModule.AbleMap.Store(reportsModule.modname, true)

dispatcher.AddHandlerToGroup(
Expand Down
1 change: 0 additions & 1 deletion alita/modules/rules.go
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,6 @@ func (m rulesModuleStruct) resetRulesBtn(bot *gotgbot.Bot, ctx *ext.Context) err
}

func LoadRules(dispatcher *ext.Dispatcher) {

HelpModule.AbleMap.Store(rulesModule.modname, true)

dispatcher.AddHandler(handlers.NewCommand("rules", rulesModule.sendRules))
Expand Down
1 change: 0 additions & 1 deletion alita/modules/users.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,5 @@ func (m usersModuleStruct) logUsers(bot *gotgbot.Bot, ctx *ext.Context) error {
}

func LoadUsers(dispatcher *ext.Dispatcher) {

dispatcher.AddHandlerToGroup(handlers.NewMessage(message.All, usersModule.logUsers), usersModule.handlerGroup)
}
1 change: 0 additions & 1 deletion alita/modules/warns.go
Original file line number Diff line number Diff line change
Expand Up @@ -698,7 +698,6 @@ func (m warnsModuleStruct) buttonHandler(b *gotgbot.Bot, ctx *ext.Context) error
}

func LoadWarns(dispatcher *ext.Dispatcher) {

HelpModule.AbleMap.Store(warnsModule.modname, true)

dispatcher.AddHandler(handlers.NewCommand("warn", warnsModule.warnUser))
Expand Down

0 comments on commit aac7021

Please sign in to comment.