андреас (kanye's version)
андреас (kanye's version)
DIAdiscord.js - Imagine an app
Created by андреас (kanye's version) on 1/30/2024 in #djs-questions
DiscordAPIError[50006]: Cannot send an empty message
I'm trying to make a command that uses an API. When I execute this command, it says the application can't send empty messages even when it wasn't supposed to send a message.
const { steamApiKey } = require("../config.json");
const axios = require("axios");
const { EmbedBuilder } = require("discord.js");

module.exports = {
name: "steam",
description: "Exibe informações de um virjola da Steam.",
async execute(bot, message, args) {
if(!args) return await message.channel.send("Envie a sua Steam ID depois do comando para executá-lo.\nPara ver sua Steam ID, basta ir no site https://store.steampowered.com/account/ e verá sua identificação abaixo de seu nome.");

const id = args[0];
const url = `https://api.steampowered.com/ISteamUser/GetPlayerSummaries/v0002/?key=${steamApiKey}&steamids=${id}`
await axios.get(url).then(res => {
console.log(res);
});

/*
const embed = new EmbedBuilder()
.setColor("#132c5d")
.setTitle();
*/
}
}
const { steamApiKey } = require("../config.json");
const axios = require("axios");
const { EmbedBuilder } = require("discord.js");

module.exports = {
name: "steam",
description: "Exibe informações de um virjola da Steam.",
async execute(bot, message, args) {
if(!args) return await message.channel.send("Envie a sua Steam ID depois do comando para executá-lo.\nPara ver sua Steam ID, basta ir no site https://store.steampowered.com/account/ e verá sua identificação abaixo de seu nome.");

const id = args[0];
const url = `https://api.steampowered.com/ISteamUser/GetPlayerSummaries/v0002/?key=${steamApiKey}&steamids=${id}`
await axios.get(url).then(res => {
console.log(res);
});

/*
const embed = new EmbedBuilder()
.setColor("#132c5d")
.setTitle();
*/
}
}
10 replies
DIAdiscord.js - Imagine an app
Created by андреас (kanye's version) on 1/26/2024 in #djs-questions
Help with !play song command.
I am a begginer at bot development and I want my bot to play song in the voice channel I am rn without using ytdl-core. How can I do this? I read all the voice pages on the Discord.js guide but still have no idea of how I am going to do this. Discord.js version: 14.14.1 Node version: 21.6.1 @discord/voice version: 0.16.1 @discord/opus version: 0.9.0
3 replies