rearrange commands folder

This commit is contained in:
2025-11-11 13:20:11 -05:00
parent f1c3285905
commit 898c8cd2e6
6 changed files with 0 additions and 0 deletions

17
commands/api/api.js Normal file
View File

@@ -0,0 +1,17 @@
const { SlashCommandBuilder } = require('discord.js');
const torn = require('../../torn.js');
module.exports = {
data: new SlashCommandBuilder()
.setName('api')
.setDescription('Directly request the Torn API')
.addStringOption(option =>
option.setName('url')
.setDescription('Full URL excluding API key')),
async execute(interaction) {
const url = interaction.options.getString('url');
const res = await torn.api(url)
console.log(JSON.stringify(res))
await interaction.reply("```json\n" + JSON.stringify(res) + "\n```");
},
};