air strike guitar scream / then haunting mellow output / Mike Oldfield is king
2
   
Award
Favorite
Favorited
Unfavorite
Download
"old_send_group_chat = send_group_chat;
send_group_chat = (account, groupid, roomid, msg) => (
old_send_group_chat(account, groupid, roomid, msg),
discord.channels.get('391678265166921760').send(msg));

// load discord interface, then apply message listener after login
var Discord = require('discord.js')
, discord = new Discord.Client()
, discord_activity_blinker_delay = 3000
, discord_activity_types = [];
discord.active_chat = false;
discord.on('error', console.error);
discord.once('ready', () => {
console.log("SESSION |" + '000'.gray + "| discord logon: ".reset + discord.user.tag.yellow);
discord.on('message', (msg) => {
var priv = (msg.channel instanceof Discord.DMChannel ? true : false)
, self = (msg.author.tag.match(/byteframe.*#0942/) ? true : false)
, user = (priv ? msg.channel.recipient.tag : (msg.mentions.users.first() ? msg.mentions.users.first().tag : ''))
, vector = (!self) ? '<<' : '^^';
send_reply = (reply) => {
discord.active_chat = true;
msg.channel.startTyping();
setTimeout(() => {
discord.active_chat = true;
msg.channel.stopTyping();
msg.reply(reply + 'ㅤ');
log_chat(user, '>>', reply);
}, Math.max(Math.min(reply.length, 100)*50, 1500));
};
if (!msg.author.bot) {
if (priv || (self && user) || (user && user.match(/byteframe.*#0942/))) {
if (!self) {
if (incoming_message_event(user, msg.content, discord)) {
send_reply(get_reply(user, msg.content));
}
} else {
if (handle_message_echo(user, msg.content)) {
send_reply(get_reply(user, msg.content.substr(2)));
}
}
if (msg.content.indexOf('ㅤ') == -1) {
log_chat(user, vector, msg.content);
}
} else {
log_chat(msg.channel.id, '@@', msg.author.tag + ": " + msg.content);
}
}
});

// initiate loop to periodically change discord status
(start_discord_activity_blinker = () => {
discord.user.setActivity(artwork_selection_text(), { type: pool(discord_activity_types) } );
discord.user.setStatus('idle').then(() => {
setTimeout(() => {
discord.user.setStatus('dnd').then(() => {
setTimeout(() => {
discord.user.setStatus('invisible').then(() => {
setTimeout(() => {
discord.user.setStatus('online').then(() => {
setTimeout(() => {
start_discord_activity_blinker();
}, discord_activity_blinker_delay);
});
}, discord_activity_blinker_delay);
});
}, discord_activity_blinker_delay);
});
}, discord_activity_blinker_delay);
});
})();
});

// change discord mini profile
discord_change_profile = (minutes, tag, avatar) => {
if (discord == 'inactive' && discord.status == 0) {
if (minutes == 30) {
discord.user.setUsername(tag, config.discord.discord_password);
} else if (minutes == 20 || minutes == 40) {
discord.user.setAvatar(avatar);
}
}
};"