<commit_before>#!/usr/bin/ruby

require 'discordrb'

# Avoid having the token in plaintext
if (File.file?("token"))
	f = File.open("token", "rb")
	token = f.read.gsub("\n","")
	bot = Discordrb::Bot.new token: token, client_id: 264450615139237899
	f.close	
else
	bot = Discordrb::Bot.new token: ENV['TOKEN'], client_id: 264450615139237899
end

bot.message(with_text: "!k2help") do |event|
	event.respond "I'm not helping you."
end

bot.message(with_text: "who is champ?") do |event|
	channel = event.user.voice_channel
	next "You're not in any voice channel!" unless channel
	bot.voice_connect(channel)
	"Connected to voice channel: #{channel.name}"
	voice_bot = bot.voice(channel)
	voice_bot.play_file('audio/whoischamp.mp3')
end

bot.run 

bot.game("!k2help")<commit_msg>Avoid blowing people's eardrums out<commit_after>#!/usr/bin/ruby

require 'discordrb'

# Avoid having the token in plaintext
if (File.file?("token"))
	f = File.open("token", "rb")
	token = f.read.gsub("\n","")
	bot = Discordrb::Bot.new token: token, client_id: 264450615139237899
	f.close	
else
	bot = Discordrb::Bot.new token: ENV['TOKEN'], client_id: 264450615139237899
end

bot.message(with_text: "!k2help") do |event|
	event.respond "I'm not helping you."
end

bot.message(with_text: "who is champ?") do |event|
	channel = event.user.voice_channel
	next "You're not in any voice channel!" unless channel
	bot.voice_connect(channel)
	"Connected to voice channel: #{channel.name}"
	voice_bot = bot.voice(channel)
	voice_bot.volume = 0.5
	voice_bot.play_file('audio/whoischamp.mp3')
end

bot.run 

bot.game("!k2help")
{'fraction_non_alphanumeric': 0.14842767295597484, 'fraction_numerical': 0.050314465408805034, 'mean_word_length': 5.288537549407114, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1123479', 'n_tokens_mistral': 655, 'n_tokens_neox': 595, 'n_words': 145}