C++ hobbyist, JavaScript / TypeScript enthusiast, average competitive programmer :D
Website: COMING SOON!
Discord: Terrarian#1265
Create interactive games for your Discord bot.
License: ISC License
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"
Hello, I have a problem, all works but when I go to play the console throws this error:
(node:583) UnhandledPromiseRejectionWarning: DiscordAPIError: Cannot send an empty message
at RequestHandler.execute (/home/runner/KitsunityApp/node_modules/discord.js/src/rest/RequestHandler.js:154:13)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async RequestHandler.push (/home/runner/KitsunityApp/node_modules/discord.js/src/rest/RequestHandler.js:39:14)
(node:583) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 0)
And this is my code, using a command handler
const SnakeGame = require('snakecord');
const snakeGame = new SnakeGame({
title: 'Serpiente ๐',
color: "RANDOM",
timestamp: true,
gameOverTitle: "Juego terminado u.u"
});
module.exports = {
name: 'snake',
description: "Juega al clasico serpiente",
aliases: ['snakegame'],
usage: '',
cooldown: 2,
args: 0,
catergory: 'Entretenimiento',
async execute(client, message, args) {
message.channel.send('Cargando...')
return snakeGame.newGame(message);
}
};
Please solve this, I really want to use this library
You have took the maintainer position without asking the permissions of the original creator permissions with changing the actual LICENSE
file.
Hello Terra-rian! I used your node package module in my bot (discord.js v12). I used it for some time then i found a bug...
When snek embed message gets deleted by server admin bot instantly crashes.. Here is error:
C:\Users\piotr\Desktop\Hexagon\node_modules\discord.js\src\rest\RequestHandler.js:154
throw new DiscordAPIError(request.path, data, request.method, res.status);
^
DiscordAPIError: Unknown Message
at RequestHandler.execute (C:\Users\piotr\Desktop\Hexagon\node_modules\discord.js\src\rest\RequestHandler.js:154:13)
at runMicrotasks ()
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async RequestHandler.push (C:\Users\piotr\Desktop\Hexagon\node_modules\discord.js\src\rest\RequestHandler.js:39:14) {
method: 'patch',
path: '/channels/870728153461575730/messages/881200565982490654',
code: 10008,
httpStatus: 404
}
[nodemon] app crashed - waiting for file changes before starting...
Hello, I wanted to avoid making this ticket and prefer to contact you another way, but I can't find any other contact information. I have recently been informed that this code exists and after looking it over I have found that It is a direct copy of the snake code from my project (TheTurkeyDev/Discord-Games@1155479). I see that no attribution has been given to me in any capacity as well. I see that you are not the original developer of this, so I understand that you may not be aware of this at all. I would like to chat with you and discus how this can all be resolved. If Discord works best for you, feel free to add me there (TurkeyDev#6719), or let me know what other way to communicate would be best.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.