diff --git a/.ssh/config b/.ssh/config index 5bfd3e5..32d5485 100644 --- a/.ssh/config +++ b/.ssh/config @@ -3,4 +3,4 @@ AddKeysToAgent yes Host git-tor-alias User gitserv HostName ltcpiz23dznrv62p.onion -ProxyCommand nc -X 5 -x 127.0.0.1:9050 %h %p +ProxyCommand nc -x 127.0.0.1:9050 %h %p diff --git a/git/ddm-bot/.gitignore b/git/ddm-bot/.gitignore new file mode 100644 index 0000000..3c4ae26 --- /dev/null +++ b/git/ddm-bot/.gitignore @@ -0,0 +1,2 @@ +auth.json +node_modules/ diff --git a/git/ddm-bot/README.md b/git/ddm-bot/README.md new file mode 100644 index 0000000..a48a64c --- /dev/null +++ b/git/ddm-bot/README.md @@ -0,0 +1,2 @@ +# Ultra Bot +discord bot diff --git a/git/ddm-bot/bot.js b/git/ddm-bot/bot.js new file mode 100644 index 0000000..ce8f705 --- /dev/null +++ b/git/ddm-bot/bot.js @@ -0,0 +1,57 @@ +const Eris = require('eris'); +const auth = require('./auth.json'); +const config = require('./config.json') + +var bot = new Eris(auth.token); + +bot.on('ready', () => { // ooh erisjs with those modern js syntax + console.log('ready lol'); +}); + +bot.on('messageCreate', (msg) => { + var mContent = msg.content; + var isAdmin = (config.allowList.indexOf(msg.author.id) >= 0) + console.log(msg.author.id) + console.log(mContent) + if (mContent.substring(0, 1) == '~') { + //bot.createMessage(msg.channel.id, "hello you have called apon the bot"); + var args = mContent.substring(1).split(' '); + var cmd = args[0]; + args = args.splice(1).join(" "); + + switch(cmd) { + case 'echo': + bot.createMessage(msg.channel.id, args); + break; + case 'welcome': + sendWelcome(msg.author); + break; + case 'help': + bot.createMessage(msg.channel.id, { + embed: { + color: 0x1111ff, + title: "Help", + description: "Commands: \nhelp - get this\necho - repeat what you say\nwelcome - send a nice welcome message" + } + }); + break; + } + } +}) + +bot.on('guildMemberAdd', (guild, member) => { + sendWelcome(member); +}) + +function sendWelcome(user) { + bot.createMessage("614829461267021850", { + content: "", + embed: { + color: 0x1111FF, + title: "Welcome, "+user.username+" to GAMESONLINEXD", + description: "Don't forget to read the rules!" + } + }) +} + +bot.connect(); diff --git a/git/ddm-bot/config.json b/git/ddm-bot/config.json new file mode 100644 index 0000000..f471bb7 --- /dev/null +++ b/git/ddm-bot/config.json @@ -0,0 +1,8 @@ +{ + "allowList": [ + "296736767158255616", "//lickthecheese", + "543047770936967168", "//ultrajo07" + ], + "helpGeneralTitle": "Help", + "helpGeneral": "Here is a list of commands:\nhelp - get this\necho - repeat what you said\nwelcome - do the welcome message again for some reason" +} diff --git a/git/ddm-bot/runBot.sh b/git/ddm-bot/runBot.sh new file mode 100755 index 0000000..89a51c6 --- /dev/null +++ b/git/ddm-bot/runBot.sh @@ -0,0 +1,7 @@ +cd /Super-Embeds/ + +while [ 1 ]; do +node bot.js +echo '[Super-Embeds]: Critical: Bot STOPED, attemting to restart.' +sleep 3 +done