redgifs: new extractor
This commit is contained in:
parent
f8b1cb6d48
commit
ebba6a8835
5 changed files with 244 additions and 5 deletions
|
@ -55,11 +55,9 @@ func URLHandler(bot *gotgbot.Bot, ctx *ext.Context) error {
|
|||
}
|
||||
|
||||
func URLFilter(msg *gotgbot.Message) bool {
|
||||
return message.Text(msg) && !message.Command(msg) && containsURL(msg)
|
||||
}
|
||||
|
||||
func containsURL(msg *gotgbot.Message) bool {
|
||||
return message.Entity("url")(msg)
|
||||
return message.Text(msg) &&
|
||||
!message.Command(msg) &&
|
||||
message.Entity("url")(msg)
|
||||
}
|
||||
|
||||
func getMessageURL(msg *gotgbot.Message) string {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue