<commit_before>/* 	vote.go
_________________________________
Parses commands and executes them for Kylixor Discord Bot
<NAME>
kylixor.com
*/

package main

import (
	"fmt"
	"strings"

	"github.com/bwmarrin/discordgo"
)

//startVote - begin a vote with variable vote options
func startVote(s *discordgo.Session, m *discordgo.MessageCreate, data string) bool {
	array := strings.SplitAfter(data, " ")
	options := array[0]
	text := array[1]

	switch options {
	case "1":
		s.ChannelMessageSend(m.ChannelID, "Starting vote...Upvote/Downvote to cast your vote")
		quoteMsg, _ := s.ChannelMessageSend(m.ChannelID, fmt.Sprintf("```\n%s\n```", text))
		s.MessageReactionAdd(m.ChannelID, quoteMsg.ID, "upvote:402490285365657600")
		s.MessageReactionAdd(m.ChannelID, quoteMsg.ID, "downvote:402490335789318144")
		break

	default:
		break
	}

	return false
}<commit_msg>More work on vote commands<commit_after>/* 	vote.go
_________________________________
Parses commands and executes them for Kylixor Discord Bot
<NAME>
kylixor.com
*/

package main

import (
	"fmt"
	"strconv"
	"strings"

	"github.com/bwmarrin/discordgo"
)

//startVote - begin a vote with variable vote options
func startVote(s *discordgo.Session, m *discordgo.MessageCreate, data string) bool {
	//Parse the incoming command into data and strings
	array := strings.SplitAfterN(data, " ", 1)
	options := array[0]
	text := array[1]
	optionNum, err := strconv.Atoi(options)
	if err != nil {
		panic(err)
	}

	//How many vote options
	switch optionNum {
	case 1:
		s.ChannelMessageSend(m.ChannelID, "Starting vote...Upvote/Downvote to cast your vote")
		quoteMsg, _ := s.ChannelMessageSend(m.ChannelID, fmt.Sprintf("```\n%s\n```", text))
		s.MessageReactionAdd(m.ChannelID, quoteMsg.ID, "upvote:402490285365657600")
		s.MessageReactionAdd(m.ChannelID, quoteMsg.ID, "downvote:402490335789318144")
		//GetVoteResults(s, m, optionNum)
		break

	default:
		break
	}

	return false
}
{'fraction_non_alphanumeric': 0.12674599068804968, 'fraction_numerical': 0.04086911536471805, 'mean_word_length': 4.755952380952381, 'pattern_counts': {'":': 1, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3880704', 'n_tokens_mistral': 761, 'n_tokens_neox': 687, 'n_words': 162}