File tree Expand file tree Collapse file tree 2 files changed +6
-7
lines changed
NotifierBot/Sources/Notifier/Commands Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,7 @@ extension Command {
4545 throw JFBotError . noPermissions ( self )
4646 }
4747 // Run the command
48+ print ( " Executing command for ' \( update. message? . text ?? " nil " ) ' " )
4849 try self . run ( update: update, context: context)
4950 } catch let error as JFBotError {
5051 JFErrorHandler . shared. handle ( error, update: update)
Original file line number Diff line number Diff line change @@ -31,12 +31,10 @@ struct FetchCommand: Command {
3131 try bot. sendMessage ( " There is no entry with the name ' \( name) ' " , to: chatID)
3232 return
3333 }
34- DispatchQueue . main. async {
35- // Take the screenshot
36- JFUtils . takeScreenshot ( url: entry!. url, filename: " /tmp/screenshot.png " , area: entry!. area)
37- // Send the screenshot as file
38- // Use the script, because its easier than sending the file in swift
39- JFUtils . sendFile ( path: " /tmp/screenshot.png " , chatID: chatID)
40- }
34+ // Take the screenshot
35+ JFUtils . takeScreenshot ( url: entry!. url, filename: " /tmp/screenshot.png " , area: entry!. area)
36+ // Send the screenshot as file
37+ // Use the script, because its easier than sending the file in swift
38+ JFUtils . sendFile ( path: " /tmp/screenshot.png " , chatID: chatID)
4139 }
4240}
You can’t perform that action at this time.
0 commit comments