remove unused debug commands

This commit is contained in:
derpystuff 2022-06-17 20:08:14 +02:00
parent 120ea7112b
commit ce726191bc
2 changed files with 0 additions and 65 deletions

View file

@ -1,27 +0,0 @@
const { getRecentImage } = require("../../../../labscore/utils/attachment");
const { createEmbed } = require("../../../../labscore/utils/embed");
const { editOrReply } = require("../../../../labscore/utils/message");
module.exports = {
name: 'attachment',
metadata: {
description: 'test',
examples: ['attachment'],
category: 'dev',
usage: 'attachment'
},
run: async (context) => {
try{
let image = await getRecentImage(context, 50)
if(!image) return editOrReply(context, { embeds: [createEmbed("warning", context, "No images found.")] })
return editOrReply(context, { embeds: [createEmbed("default", context, {
image: {
url: image
}
})] })
}catch(e){
console.log(e)
}
},
};

View file

@ -1,38 +0,0 @@
const { Constants } = require('detritus-client');
const { InteractionCallbackTypes } = require('detritus-client/lib/constants');
const { paginator } = require('../../../../labscore/client');
const createEmbedMessage = (title, description) => ({
embeds: [{ title, description }]
});
module.exports = {
name: 'page',
metadata: {
description: 'pagination test',
examples: ['page'],
category: 'dev',
usage: 'page'
},
run: async (context) => {
const message = context
const pages = [
createEmbedMessage("Page", "ddd"),
createEmbedMessage("Page2", "eee"),
createEmbedMessage("Page 3", "h")
]
const buttons = ["previous","next", {customId: "german", emoji: `<:german:856501761857683486>`, style: 4}]
const page = await paginator.createPaginator({
context,
pages,
buttons
});
// Custom button example, event only triggers for
page.on("interaction", async (e) => {
if(e.context.customId == "german"){
await e.context.respond(InteractionCallbackTypes.UPDATE_MESSAGE, {"content": "german button activated"})
}
})
},
};