mirror of
https://gitlab.com/ceda_ei/Quadnite-Bot
synced 2026-05-06 05:40:04 +02:00
Use ugoki server instead of hard coded gifs
This commit is contained in:
@@ -8,9 +8,8 @@ function joinUsers(users) {
|
||||
}
|
||||
|
||||
|
||||
module.exports = (forms, gifs) => (ctx) => {
|
||||
module.exports = (forms, getGif) => (ctx) => {
|
||||
|
||||
const gif = gifs[Math.floor(Math.random() * gifs.length)];
|
||||
const message = ctx.message.text.replace(/^[^ ]+\s*/, "")
|
||||
.match(/^((@\w+(\s+|$))*)(.*)/);
|
||||
const users = message[1].trim().split(" ").filter(i => i.length);
|
||||
@@ -39,6 +38,7 @@ module.exports = (forms, gifs) => (ctx) => {
|
||||
reply = forms.none
|
||||
.replace("{}", user);
|
||||
|
||||
ctx.replyWithAnimation(gif, {caption: reply});
|
||||
getGif()
|
||||
.then(gif => ctx.replyWithAnimation(gif.data.url, {caption: reply}));
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user