discord-multipurpose-bot/commands/fun/bored.js
Ayden cb5a906850
Some checks are pending
Docker / build (push) Waiting to run
Feat/Add Music Commands (#1)
* add simple music functionality

* update workflow

* update Dockerfile

* update Dockerfile

* update Dockerfile

* update Dockerfile

* add few more music commands

* add lyrics command

* update lyrics command

* add loop, and add categories to all commands

* change discord status

* seperate distube and change startup console theme

* Update README

* UPDATE LICENSE file

* fix docker compose image, add better error handling for distube and update tagging workflow

* switch to node-alpine image for docker

* switch to node-alpine image for docker

* update ascii

* music commands imporvements, implement live lyrics, some guards and bot leaving on empty

* use ffmpeg package rather than ffmpeg-static
2025-09-21 01:26:18 +01:00

46 lines
1.4 KiB
JavaScript

const { SlashCommandBuilder, EmbedBuilder } = require("discord.js");
const axios = require("axios");
module.exports = {
data: new SlashCommandBuilder()
.setName("bored")
.setDescription("Get a random activity to do."),
category: "Fun",
async execute(interaction) {
try {
const res = await axios.get("https://bored-api.appbrewery.com/random");
const activity = res.data.activity;
const type = res.data.type;
const accessibility = res.data.accessibility;
const duration = res.data.duration;
const kidFriendly = res.data.kidFriendly;
const embed = new EmbedBuilder()
.setColor("#9b226a")
.setTitle("Random Activity to Do")
.addFields(
{ name: "Activity", value: `${activity}` },
{ name: "Type", value: `${type}` },
{ name: "Accessibility", value: `${accessibility}` },
{ name: "Duration", value: `${duration}` },
{ name: "Kid Friendly", value: `${kidFriendly}` }
)
.setTimestamp()
.setFooter({
text: interaction.guild.name,
iconURL: interaction.guild.iconURL(),
});
await interaction.reply({ embeds: [embed] });
} catch (error) {
console.error(error);
await interaction.reply({
content: "There was an error trying to fetch a random activity.",
epemeral: true,
});
}
},
};