starboard: Fix message link check

master
Luther Wen Xu 2019-11-20 16:36:49 +07:00
parent b843195845
commit 11505f0e1a
Signed by: chanbakjsd
GPG Key ID: B7D77E3E9D102B70
1 changed files with 2 additions and 2 deletions

@ -137,12 +137,12 @@ func handleStarRequest(s *discordgo.Session, m *discordgo.MessageCreate) {
s.ChannelMessageSend(m.ChannelID, "**STAR > **It doesn't seem like you've sent a valid message link!")
return
}
linkSplit := strings.SplitN(m.Content, "/", 7)
linkSplit := strings.SplitN(commandSplit[1], "/", 7)
if len(linkSplit) < 7 {
s.ChannelMessageSend(m.ChannelID, "**STAR > **It doesn't seem like you've sent a valid message link!")
return
}
if linkSplit[0] != "https" && linkSplit[0] != "http" {
if linkSplit[0] != "https:" && linkSplit[0] != "http:" {
s.ChannelMessageSend(m.ChannelID, "**STAR > **It doesn't seem like you've sent a valid message link!")
return
}