<commit_before>var ChatBot = require('steam-chat-bot').ChatBot;

// This will log in a steam user with the specified username and password 
// You can also pass in a steam guard code from an email
var myBot = new ChatBot('username', 'password', { guardCode: 'XXXXX', autoReconnect: true });

// Set up the triggers to control the bot
myBot.addTriggers([

	// Commands to stop/unstop the bot from saying anything in a chatroom
	{ 
		name: 'MuteCommand', 
		type: 'BotCommandTrigger', 
		options: { 
			matches: ['!mute', '!pause'], 
			exact: true,
			callback: function(bot) { bot.mute(); }
		} 
	},
	{ 
		name: 'UnmuteCommand', 
		type: 'BotCommandTrigger', 
		options: { 
			matches: ['!unmute', '!unpause'], 
			exact: true,
			callback: function(bot) { bot.unmute(); }
		} 
	},

	// Command to join Bad Rats whenever it's mentioned	
	{ 
		name: 'BadRatsCommand', 
		type: 'BotCommandTrigger', 
		options: { 
			matches: ['bat rats'], 
			exact: false,
			callback: function(bot) { bot.joinGame(34900); }
		} 
	},

	// Automatically accept invites from any user to the specified group chat
	{ 
		name: 'AcceptChatInvite', 
		type: 'AcceptChatInviteTrigger', 
		options: { 
			chatrooms: { 'GroupSteamId': 'Welcome message' }, 
			autoJoinAfterDisconnect: true
		} 
	},

	// Automatically accept all friend requests
	{ name: 'AcceptFriendRequest', type: 'AcceptFriendRequestTrigger' },

	// Reply triggers - respond to a chat/private message if it matches a set of inputs 
	// (case-insensitive exact or substring match), and choose randomly from a set of responses
	{ 
		name: 'EmptyQuoteReply', 
		type: 'ChatReplyTrigger', 
		options: { 
			matches: ['^'], 
			responses: ['^'], 
			exact: true, 
			delay: 1000, 
			probability: 0.2, 
			timeout: 10*1000 
		} 
	},
	{ 
		name: 'HeartReply', 
		type: 'ChatReplyTrigger', 
		options: { 
			matches: ['<3'], 
			responses: ['</3', '<3'], 
			exact: true, 
			delay: 500, 
			probability: 0.5, 
			timeout: 60*60*1000 } },
	{ 
		name: 'PingReply', 
		type: 'ChatReplyTrigger', 
		options: { 
			matches: ['ping'], 
			responses: ['pong'], 
			exact: true, 
			delay: 1000, 
			probability: 1, 
			timeout: 10*1000 } },
	{ 
		name: 'SteveHoltReply', 
		type: 'ChatReplyTrigger', 
		options: { 
			matches: ['steve holt', 'steve holt!'], 
			responses: ['\\o/'], 
			exact: false, 
			delay: 500, 
			timeout: 10*1000 
		} 
	},

		name: 'SteamIDCheck', 
		type: 'SteamInfoTrigger', 
		options: { 
			command: "!steamrep", 
			delay: 2000, 
			timeout: 5000 
		} 
	},
	// Reply triggers that will only respond to a particular user
	{ 
		name: 'SingleUserReply', 
		type: 'ChatReplyTrigger', 
		options: { 
			matches: ['hi bot'], 
			responses: ['hi boss!'], 
			exact: true, 
			users: ['76561197961244239'] 
		} <commit_msg>add heal and grin replies, disabled by default<commit_after>var ChatBot = require('steam-chat-bot').ChatBot;

// This will log in a steam user with the specified username and password 
// You can also pass in a steam guard code from an email
var myBot = new ChatBot('username', 'password', { guardCode: 'XXXXX', autoReconnect: true });

// Set up the triggers to control the bot
myBot.addTriggers([

	// Commands to stop/unstop the bot from saying anything in a chatroom
	{ 
		name: 'MuteCommand', 
		type: 'BotCommandTrigger', 
		options: { 
			matches: ['!mute', '!pause'], 
			exact: true,
			callback: function(bot) { bot.mute(); }
		} 
	},
	{ 
		name: 'UnmuteCommand', 
		type: 'BotCommandTrigger', 
		options: { 
			matches: ['!unmute', '!unpause'], 
			exact: true,
			callback: function(bot) { bot.unmute(); }
		} 
	},

	// Command to join Bad Rats whenever it's mentioned	
	{ 
		name: 'BadRatsCommand', 
		type: 'BotCommandTrigger', 
		options: { 
			matches: ['bat rats'], 
			exact: false,
			callback: function(bot) { bot.joinGame(34900); }
		} 
	},

	// Automatically accept invites from any user to the specified group chat
	{ 
		name: 'AcceptChatInvite', 
		type: 'AcceptChatInviteTrigger', 
		options: { 
			chatrooms: { 'GroupSteamId': 'Welcome message' }, 
			autoJoinAfterDisconnect: true
		} 
	},

	// Automatically accept all friend requests
	{ name: 'AcceptFriendRequest', type: 'AcceptFriendRequestTrigger' },

	// Reply triggers - respond to a chat/private message if it matches a set of inputs 
	// (case-insensitive exact or substring match), and choose randomly from a set of responses
	{ 
		name: 'EmptyQuoteReply', 
		type: 'ChatReplyTrigger', 
		options: { 
			matches: ['^'], 
			responses: ['^'], 
			exact: true, 
			delay: 1000, 
			probability: 0.2, 
			timeout: 10*1000 
		} 
	},
	{ 
		name: 'HeartReply', 
		type: 'ChatReplyTrigger', 
		options: { 
			matches: ['<3'], 
			responses: ['</3', '<3'], 
			exact: true, 
			delay: 500, 
			probability: 0.5, 
			timeout: 60*60*1000 } },
	{ 
		name: 'PingReply', 
		type: 'ChatReplyTrigger', 
		options: { 
			matches: ['ping'], 
			responses: ['pong'], 
			exact: true, 
			delay: 1000, 
			probability: 1, 
			timeout: 10*1000 } },
/*	you probably don't have :D: or :medicon: emotes on your bot, so this is commented out.
	{ 
		name: 'HealReply', 
		type: 'ChatReplyTrigger', 
		options: { 
			matches: ['heal','health','heal me',"i'm hurt","I'm hurt",'im hurt','Im hurt'], 
			responses: [':medicon:'], 
			exact: true, 
			delay: 1000, 
			probability: 1, 
			timeout: 10*1000 } },
		name: 'GrinReply', 
		type: 'ChatReplyTrigger', 
		options: { 
			matches: [':D'], 
			responses: [':D:'], 
			exact: true, 
			delay: 500, 
			probability: 0.5, 
			timeout: 60*1000 } },
*/	{ 
		name: 'SteveHoltReply', 
		type: 'ChatReplyTrigger', 
		options: { 
			matches: ['steve holt', 'steve holt!'], 
			responses: ['\\o/'], 
			exact: false, 
			delay: 500, 
			timeout: 10*1000 
		} 
	},

		name: 'SteamIDCheck', 
		type: 'SteamInfoTrigger', 
		options: { 
			command: "!steamrep", 
			delay: 2000, 
			timeout: 5000 
		} 
	},
	// Reply triggers that will only respond to a particular user
	{ 
		name: 'SingleUserReply', 
		type: 'ChatReplyTrigger', 
		options: { 
			matches: ['hi bot'], 
			responses: ['hi boss!'], 
			exact: true, 
			users: ['76561197961244239'] 
		} 
{'fraction_non_alphanumeric': 0.1486861433001469, 'fraction_numerical': 0.029051738207932103, 'mean_word_length': 3.0826115922718187, 'pattern_counts': {'":': 0, '<': 9, '<?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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4682887', 'n_tokens_mistral': 2673, 'n_tokens_neox': 2120, 'n_words': 594}