Compare commits
No commits in common. "035dbde819c2205f8381174acdf6a7724b0c045a" and "e98c9b46f106dea71b8fe183952789e8ce4628bb" have entirely different histories.
035dbde819
...
e98c9b46f1
@ -76,10 +76,6 @@ func (d *DiscordDaemon) run() {
|
||||
d.app.err.Printf("Discord: Failed to start daemon: %v", err)
|
||||
return
|
||||
}
|
||||
// Sometimes bot.State isn't populated quick enough
|
||||
for d.bot.State == nil {
|
||||
continue
|
||||
}
|
||||
d.username = d.bot.State.User.Username
|
||||
// Choose the last guild (server), for now we don't really support multiple anyway
|
||||
guild, err := d.bot.Guild(d.bot.State.Guilds[len(d.bot.State.Guilds)-1].ID)
|
||||
|
Before Width: | Height: | Size: 37 KiB |
Before Width: | Height: | Size: 41 KiB |
Before Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 46 KiB |
Before Width: | Height: | Size: 92 KiB |
Before Width: | Height: | Size: 85 KiB |
Before Width: | Height: | Size: 59 KiB |
Before Width: | Height: | Size: 58 KiB |
10
stripmd.go
@ -44,16 +44,6 @@ func StripAltText(md string, links bool) (string, []*dg.MessageEmbed) {
|
||||
out += md[URLStart : URLEnd+1]
|
||||
}
|
||||
previousURLEnd = URLEnd
|
||||
// Removing links often leaves a load of extra newlines which look weird, this removes them.
|
||||
if links {
|
||||
next := 2
|
||||
for md[URLEnd+next] == '\n' {
|
||||
next++
|
||||
}
|
||||
if next >= 3 {
|
||||
previousURLEnd += next - 2
|
||||
}
|
||||
}
|
||||
altTextStart, URLStart, URLEnd = -1, -1, -1
|
||||
continue
|
||||
}
|
||||
|