falcao-g / falgames Goto Github PK
View Code? Open in Web Editor NEWFalgames is a powerful npm package designed to help others create awesome discord bots
Home Page: https://www.npmjs.com/package/falgames
License: MIT License
Falgames is a powerful npm package designed to help others create awesome discord bots
Home Page: https://www.npmjs.com/package/falgames
License: MIT License
The code cant find the images.
It need a small fix:
const imagePath = path.join(__dirname, "..", `images/${imageFilenames[i]}`)
Start the 2048 game
No response
There is a small error which cause the Matchpairs game to never time. Here the fix:
const collector = msg.createMessageComponentCollector({ idle: this.options.timeoutTime});
Start the Matchpairs game and wait. It wont timeout.
No response
Here a json source for restoring the Would you rather game:
https://github.com/itsbrunodev/party-game-sentences/blob/master/src/json/would-you-rather.json
/*/* async getWyrQuestion() {
return await fetch('https://api.aniket091.xyz/wyr').then(res => res.json()).then(res => res?.data).catch(e => { return {} });
}*/
async startGame() {
if (this.options.isSlashGame || !this.message.author) {
if (!this.message.deferred) await this.message.deferReply().catch(e => {});
this.message.author = this.message.user;
this.options.isSlashGame = true;
}
const questionDB = JSON.parse(await (fs.readFileSync(path.join(__dirname,"would-you-rather.json"), "utf-8")));
const question_number = Math.floor(Math.random() * questionDB.length)
this.data = {option1 :questionDB[question_number][0], option2: questionDB[question_number][1]}
// this.data = await this.getWyrQuestion();
// if (!this.data.title) return this.sendMessage({ content: this.options.errMessage });
const embed = new EmbedBuilder()
.setColor(this.options.embed.color)
.setTitle(this.options.embed.title)
.setDescription(`1. ${this.data.option1} \n2. ${this.data.option2}`)
.setAuthor({ name: this.message.author.tag, iconURL: this.message.author.displayAvatarURL({ dynamic: true }) })
//.addFields({ name: 'Details', value: `**Title:** ${this.data.title}\n**Author:** ${this.data.author}` })
/* const btn1 = new ButtonBuilder().setStyle(this.options.buttonStyle).setLabel(this.options.buttons.option1).setCustomId('wyr_1').setEmoji('1️⃣');
const btn2 = new ButtonBuilder().setStyle(this.options.buttonStyle).setLabel(this.options.buttons.option2).setCustomId('wyr_2').setEmoji('2️⃣');*/
const btn1 = new ButtonBuilder().setStyle(this.options.buttonStyle).setCustomId('wyr_1').setEmoji('1️⃣');
const btn2 = new ButtonBuilder().setStyle(this.options.buttonStyle).setCustomId('wyr_2').setEmoji('2️⃣');
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.