Closed Vaibhav-Naik-26 closed 2 years ago
CODE:
const { Client, Message, MessageEmbed } = require('discord.js'); const SnakeGame = require('snakecord') module.exports = { name: 'snake', aliases: ['snake'], description: 'Play Snake Game on Discord', usage: '', /** * @param {Client} client * @param {Message} message * @param {String[]} args */ run: async (client, message, args) => { const snakeGame = new SnakeGame({ title: 'Snake Game', color: "BLUE", timestamp: true, // gameOverTitle: "<a:GameOver:823784027713699841> Game Over" gameOverTitle: "Game Over" }); return await snakeGame.newGame(message); } }
ERROR:
DiscordAPIError: Cannot send an empty message at RequestHandler.execute (/home/runner/toxic-all-last/node_modules/discord.js/src/rest/RequestHandler.js:154:13) at processTicksAndRejections (node:internal/process/task_queues:96:5) { method: 'post', path: '/channels/995611333682802709/messages', code: 50006, httpStatus: 400 }
Dependencies: "discord.js": "^12.5.1" "snakecord": "^1.0.9"
Discord.js below version 13 is no longer supported, and will not work with this module. Please update it with npm i discord.js@latest. The module should work as expected afterward.
npm i discord.js@latest
Okay Thanks
CODE:
ERROR:
Dependencies: "discord.js": "^12.5.1" "snakecord": "^1.0.9"