diff --git a/plugins/Giphy/giphy.js b/plugins/Giphy/giphy.js index 89a2624..75cec2a 100644 --- a/plugins/Giphy/giphy.js +++ b/plugins/Giphy/giphy.js @@ -16,6 +16,7 @@ exports.init = function(pluginName) { } function fetchAndSendMyGif(message, tag, type) { + message.channel.startTyping(); var request_url = `http://api.giphy.com/v1/${type}/random?api_key=${API_KEY}&tag=${tag}`; logger.log("Request url: " + request_url + "\ttag: " + tag); request({ @@ -23,6 +24,7 @@ function fetchAndSendMyGif(message, tag, type) { json: true, }, function (error, response, body) { var result = null; + message.channel.stopTyping(); if (!error && response.statusCode === 200 && body) { result = body.data.url || "Nothing found for keyword: " + tag; } diff --git a/plugins/Meowii/meowii.js b/plugins/Meowii/meowii.js index c373cae..23a15bc 100644 --- a/plugins/Meowii/meowii.js +++ b/plugins/Meowii/meowii.js @@ -14,11 +14,13 @@ exports.init = function(pluginName) { function fetchAndSendMyGif(message, tag) { var request_url = "http://api.giphy.com/v1/gifs/random?api_key=dc6zaTOxFJmzC&tag=" + tag; logger.log("Request url: " + request_url + "\ttag: " + tag); + message.channel.startTyping(); request({ url: request_url, json: true, }, function (error, response, body) { var result = null; + message.channel.stopTyping(); if (!error && response.statusCode === 200) { result = body.data.url; }