Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
zekroTJA committed Oct 19, 2020
2 parents 22e0b13 + ebc5de6 commit 7673fde
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions internal/commands/cmdkarma.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down
2 changes: 1 addition & 1 deletion internal/commands/cmdtwitchnotify.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 7673fde

Please sign in to comment.