mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-08 14:13:02 -04:00
make development commands silently error
This commit is contained in:
parent
575bbaa73a
commit
9fa0fb1ee4
4 changed files with 3 additions and 48 deletions
|
@ -1,36 +0,0 @@
|
|||
const { createEmbed } = require("../../../../labscore/utils/embed");
|
||||
const { editOrReply } = require("../../../../labscore/utils/message");
|
||||
const { flag } = require("../../../../service/makesweet");
|
||||
const { getRecentImage } = require("../../../../labscore/utils/attachment");
|
||||
|
||||
module.exports = {
|
||||
name: 'test',
|
||||
label: 'text',
|
||||
metadata: {
|
||||
description: 'test',
|
||||
description_short: 'Bot test',
|
||||
examples: ['test'],
|
||||
category: 'dev',
|
||||
usage: 'test'
|
||||
},
|
||||
args: [
|
||||
{ default: false, name: "noreply", type: "bool", help: "Should this command return the output?" },
|
||||
{ default: 2, name: "jsonspacing", type: "number", help: "JSON spacing sizes" },
|
||||
{ default: true, name: "async", type: "bool", help: "Compute async?" }
|
||||
],
|
||||
run: async (context, args) => {
|
||||
if(context.user.id !== "223518178100248576") return;
|
||||
let image = await getRecentImage(context, 50)
|
||||
if(!image) return editOrReply(context, { embeds: [createEmbed("warning", context, "No images found.")] })
|
||||
if(!args.text) args.text = ""
|
||||
try {
|
||||
let mkswt = await flag(image)
|
||||
return editOrReply(context, { content:"ww", files: [{
|
||||
filename: "makesweet.gif",
|
||||
value: mkswt.body
|
||||
}] })
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
}
|
|
@ -20,10 +20,7 @@ module.exports = {
|
|||
{ default: true, name: "async", type: "bool", help: "Async evaluation" }
|
||||
],
|
||||
onBefore: context => context.user.isClientOwner,
|
||||
onCancel: context =>
|
||||
context.reply(
|
||||
`${context.user.mention}, you are lacking the permission \`BOT_OWNER\`.`
|
||||
),
|
||||
onCancel: ()=>{},
|
||||
run: async (context, args) => {
|
||||
await context.triggerTyping();
|
||||
const { matches } = Utils.regex(
|
||||
|
|
|
@ -11,10 +11,7 @@ module.exports = {
|
|||
usage: 'reload'
|
||||
},
|
||||
onBefore: context => context.user.isClientOwner,
|
||||
onCancel: context =>
|
||||
context.reply(
|
||||
`${context.user.mention}, you are lacking the permission \`BOT_OWNER\`.`
|
||||
),
|
||||
onCancel: ()=>{},
|
||||
run: async (context) => {
|
||||
await context.triggerTyping();
|
||||
const time = Date.now();
|
||||
|
|
|
@ -17,10 +17,7 @@ module.exports = {
|
|||
{ default: false, name: "force", type: "bool", help: "Force update" }
|
||||
],
|
||||
onBefore: context => context.user.isClientOwner,
|
||||
onCancel: context =>
|
||||
context.reply(
|
||||
`${context.user.mention}, you are lacking the permission \`BOT_OWNER\`.`
|
||||
),
|
||||
onCancel: ()=>{},
|
||||
run: async (context, args) => {
|
||||
let response = await editOrReply(context, createEmbed("loading", context, "Updating bot..."))
|
||||
try{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue