diff --git a/internal/commands/cmdkarma.go b/internal/commands/cmdkarma.go index 8505a8cc..ae8bac6e 100644 --- a/internal/commands/cmdkarma.go +++ b/internal/commands/cmdkarma.go @@ -71,14 +71,16 @@ func (c *CmdKarma) Exec(ctx shireikan.Context) error { karmaListStr = "*No entries for this guild.*" } - for i, v := range karmaList { + var i int + for _, v := range karmaList { m, err := discordutil.GetMember(ctx.GetSession(), v.GuildID, v.UserID) if err != nil { continue } + i++ karmaListStr = fmt.Sprintf("%s\n`%d` - %s - **%d**", - karmaListStr, i+1, m.User.String(), v.Value) + karmaListStr, i, m.User.String(), v.Value) } emb := &discordgo.MessageEmbed{ diff --git a/internal/commands/cmdtwitchnotify.go b/internal/commands/cmdtwitchnotify.go index 0e9ec263..7898e541 100644 --- a/internal/commands/cmdtwitchnotify.go +++ b/internal/commands/cmdtwitchnotify.go @@ -50,7 +50,7 @@ func (c *CmdTwitchNotify) IsExecutableInDMChannels() bool { func (c *CmdTwitchNotify) Exec(ctx shireikan.Context) error { tnw, _ := ctx.GetObject("tnw").(*twitchnotify.NotifyWorker) - db, _ := ctx.GetObject("dbtnw").(database.Database) + db, _ := ctx.GetObject("db").(database.Database) if tnw == nil { return util.SendEmbedError(ctx.GetSession(), ctx.GetChannel().ID,