Giter VIP home page Giter VIP logo

discord-votemaster's Introduction

Photo of the smoke and fire from a small rocket launching in front of a forest.

๐Ÿ‘‹ Hello!

I'm a software engineer building GitHub here on GitHub :octocat:.

I mostly focus on front-end web development (in vanilla JS, TypeScript, React, and Angular) but I've also done server-side work (in Java and Scala), Windows applications, desktop software plugins, and even embedded systems. My resume is public and mostly updated.

I graduated from USF in 2020 with a degree in mechanical engineering, where I spent way too much of my time building rockets ๐Ÿš€.

In my free time I go to concerts, build stuff, and race sailboats in Tampa Bay โ›ต.


๐Ÿ’ฌ You can get in touch with me by starting a new discussion on my profile repo or by sending me an email.

discord-votemaster's People

Contributors

iansan5653 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

discord-votemaster's Issues

Another Fatal error thrown when required parameters are not passsed to commands

Hey Ian,
found another one just for your information.
when user inputs a command!vote #0 without the following args[1] will result in another fatal crash.
so I included || !args[1] to the if statement to catch.
look forward to see your latest edition. Eventually I will add some more features and fork this baby and ensure credit is due for the wonderful poll system you coded.
best,
Just

ISSUE:

if(activePollsInServer.length === 0) {
				voteResponse = `There aren't any active polls in this server right now, so you can't vote.`;

-                                } else if(!args[0] || args[0].charAt(0) !== '#') {
				// Only the vote was supplied
				if(activePollsInServer.length === 1) {
					voteResponse = polls.get(activePollsInServer[0]).vote(args[0].toLowerCase(), message.author).message;
				} else {
					// TODO dynamic examples
					voteResponse = 'Sorry, I don\'t know which poll to vote on. Please specify the poll id number using a pound sign and a number (ie \'!vote #1 A\') before your vote.';
				}

FIXED:

if(activePollsInServer.length === 0) {
				voteResponse = `There aren't any active polls in this server right now, so you can't vote.`;

			} else if(!args[0] || args[0].charAt(0) !== '#' || !args[1]) {
				// Only the vote was supplied
				if(activePollsInServer.length === 1) {
					voteResponse = polls.get(activePollsInServer[0]).vote(args[0].toLowerCase(), message.author).message;
				} else {
					// TODO dynamic examples
					voteResponse = 'Sorry, I don\'t know which poll to vote on. Please specify the poll id number using a pound sign and a number (ie \'!vote #1 A\') before your vote.';
				}

Add option to list users that voted to !results

Hi, I noticed you had strikethrough text describing a feature to list the users that voted. Is this feature something planned and not yet made? Or a feature that was made and Discord changed their permissions to no longer make this possible?

Fatal error thrown when required parameters are not passsed to commands

ISSUE: the command !results #0 or !vote #0 is failing to catch some bad input. Input by a user it throws a unexpected error and crashes the script when a user sends a command !results without the #

index.js:367
            } else if(args[0].charAt(0) !== '#') {
                              ^
TypeError: Cannot read property 'charAt' of undefined

and

events.js:180
    throw err; // Unhandled 'error' event
    ^

FIX:
where
if(args[0].charAt(0) !== '#') {

should be

if(!args[0] || args[0].charAt(0) !== '#') {

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.