Skip to content
This repository has been archived by the owner on Nov 18, 2024. It is now read-only.

Commit

Permalink
fixes null pointer
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian Winkler committed Nov 19, 2016
1 parent 8c482c3 commit bae9495
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ var (
)

const (
VERSION string = "1.11"
VERSION string = "1.11.1"
RELEASE_URL string = "https://github.com/Seklfreak/discord-image-downloader-go/releases/latest"
IMGUR_CLIENT_ID string = "a39473314df3f59"
REGEXP_URL_TWITTER string = `^http(s?):\/\/pbs\.twimg\.com\/media\/[^\./]+\.(jpg|png)((\:[a-z]+)?)$`
Expand Down Expand Up @@ -287,7 +287,7 @@ func handleDiscordMessage(m *discordgo.Message) {
}
}
} else if folderName, ok := InteractiveChannelWhitelist[m.ChannelID]; ok {
if DiscordUserId != "" && m.Author.ID != DiscordUserId {
if DiscordUserId != "" && m.Author != nil && m.Author.ID != DiscordUserId {
if link, ok := interactiveChannelLinkTemp[m.ChannelID]; ok {
if m.Content == "." {
dg.ChannelMessageSend(m.ChannelID, "Download started\n")
Expand Down

0 comments on commit bae9495

Please sign in to comment.