Giter Club home page Giter Club logo

playerbot's Introduction

Hi I'm Arihant

Linkedin BadgeMail BadgeNPM Badge

Most Used Languages/Technologies

Java Badge Python Badge Javascript Badge Typescript Badge Nodejs Badge

About Me

  • My name is Arihant Tripathi, I am currently a student at Rutgers University
  • I am developer and Machine Learning Enthusiast
  • I love to work on Open Source projects

Currently Learning/Projects Working On

  • Released a new Python Project on better YT Summarization using Llama2 and OpenAIWhisper
  • Working on a Python Package to streamline DCGANs and Diffusion models
  • Released a new C++ Machine Learning Library, out here: https://github.com/Siris2314/MLPP

Profile Visits

Visitors


Coding Stats

Python   26 mins         █████████████████████████   99.39 %
C        0 secs          ░░░░░░░░░░░░░░░░░░░░░░░░░   00.61 %

Github Stats

Siris2314's GitHub stats

Currently Listening

Spotify

playerbot's People

Contributors

atlinx avatar siris2314 avatar sorrer avatar

Stargazers

 avatar

Watchers

 avatar  avatar

playerbot's Issues

Would you rather game

Try converting this to work with lobby system.

const { MessageButton, MessageActionRow } = require("discord.js");
const fetch = require("node-fetch")


module.exports = {

    name:'wyr',
    description:'Would You Rather Game',


    async execute(message, args,client){


        try{

            const res = await fetch("http://api.xaliks.xyz/random/wyr").then((re) =>
                re.json()
            );

        

            const row = new MessageActionRow()
            .addComponents(

                new MessageButton()
                        .setCustomId('primary')
                        .setLabel(`${res.questions[0].question}`)
                        .setStyle('PRIMARY'),
                new MessageButton()
                        .setCustomId("second")
                        .setLabel(`${res.questions[1].question}`)
                        .setStyle("DANGER"),
        );

        message.channel.send({content: "Would You Rather", components:[row]})

        
        const filter = interaction => interaction.customId === 'primary' && interaction.user.id === message.author.id;
        const filter2 = interaction => interaction.customId === 'second' && interaction.user.id === message.author.id;
        const collector = message.channel.createMessageComponentCollector({ filter, time: 60000 });
        const collector2 = message.channel.createMessageComponentCollector({ filter: filter2, time: 60000 });

``
            collector.on('collect', async(ButtonInteraction) => {

                if(!ButtonInteraction.member.id === message.author.id) return interaction.reply({ content: "Only the author of the button can use this command", ephemeral: true})
                const id = ButtonInteraction.customId
                
                
                if (id === 'primary') {
                    const row2 = new MessageActionRow()
                    .addComponents(
                        new MessageButton()
                            .setCustomId('primary')
                            .setLabel(`${res.questions[0].question}: `+ " "+ `${res.questions[0].percentage}%`)
                            .setStyle('PRIMARY')
                            .setDisabled(),
                    new MessageButton()
                            .setCustomId("second")
                            .setLabel(`${res.questions[1].question}: `+ " "+ `${res.questions[1].percentage}%`)
                            .setStyle("SECONDARY")
                            .setDisabled(),
                    );

                    await ButtonInteraction.update({ content: `**Would You Rather**`, components: [row2] });
                }
                    
                
            })

            collector2.on('collect', async(ButtonInteraction) => {

                if(!ButtonInteraction.member.id === message.author.id) return interaction.reply({ content: "Only the author of the button can use this command", ephemeral: true})
                const id = ButtonInteraction.customId

                if (id === 'second') {
                    const row2 = new MessageActionRow()
                    .addComponents(
                        new MessageButton()
                            .setCustomId('primary')
                            .setLabel(`${res.questions[0].question}: `+ " "+ `${res.questions[0].percentage}%`)
                            .setStyle('SECONDARY')
                            .setDisabled(),
                    new MessageButton()
                            .setCustomId("second")
                            .setLabel(`${res.questions[1].question}: `+ " "+ `${res.questions[1].question}%`)
                            .setStyle("DANGER")
                            .setDisabled(),
                    );
                    await ButtonInteraction.update({ content: `**Would You Rather**`, components: [row2] });
                }
            });``

        } catch(err){
            message.channel.send('API Timed Out');
        }



    }





}

Typing racing game

Will have to generate images/use fancy font to prevent copy and paste cheating

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.