mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-09 06:33:05 -04:00
unify typing logic for a more consistent experience
This commit is contained in:
parent
d2aeecf70d
commit
1ca74d3c2c
67 changed files with 240 additions and 109 deletions
|
@ -6,6 +6,7 @@ const { STATICS } = require('#utils/statics');
|
|||
|
||||
const superagent = require('superagent');
|
||||
const { PERMISSION_GROUPS } = require("#constants");
|
||||
const { acknowledge } = require("#utils/interactions");
|
||||
|
||||
module.exports = {
|
||||
name: 'qr',
|
||||
|
@ -20,7 +21,8 @@ module.exports = {
|
|||
},
|
||||
permissionsClient: [...PERMISSION_GROUPS.baseline, ...PERMISSION_GROUPS.attachments],
|
||||
run: async (context, args) => {
|
||||
|
||||
await acknowledge(context);
|
||||
|
||||
// If we have an argument, generate code
|
||||
if(args.text.length){
|
||||
let response = await editOrReply(context, createEmbed("loading", context, `Generating qr code...`))
|
||||
|
@ -49,8 +51,6 @@ module.exports = {
|
|||
if (!image) return editOrReply(context, createEmbed("warning", context, "No images found."))
|
||||
|
||||
try {
|
||||
await context.triggerTyping();
|
||||
|
||||
const t = Date.now();
|
||||
|
||||
let res = await superagent.get(`https://api.qrserver.com/v1/read-qr-code/`)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue