0xGizmolab / djs-games

A package for discord.js mini games which can be used in your bots
https://docs.gizmolab.xyz/npm/games
MIT License
41 stars 10 forks source link

Update connect4-game.js #14

Open DreamBoy65 opened 2 years ago

DreamBoy65 commented 2 years ago

C4 With slash.

SLASH USAGE:

const { SlashCommandBuilder } = require('@discordjs/builders');
const { ConnectFour } = require("djs-games")

module.exports = {
  name: "c4",
  data: new SlashCommandBuilder()
    .setName('c4')
    .setDescription('C4 game')
    .addUserOption((option) => 
      option
      .setName('user')
      .setDescription('The user to play')
      .setRequired(true)
                  ),
  run: async(client, interaction) => {

    let opp = interaction.options.get('user').value;

   console.log(opp)

  const game = new ConnectFour({
  message: interaction,
  player1: '🔴',
  player2: '🟡',
  opponent: opp,
    slash: true
    })
game.start()

  }
}