/tech/ - Tech

Technology


Name
X
Subject
Email
Message
Files
Password
[New Post]


retard discord bot
Replies: >>38 >>39
>>36 (OP) 
'use strict';
const config = require("./config.js");
const store = require("./store.js");
const middleware = require("./middleware.js");
const helpers = require("./helpers.js");

const eris = require("eris");
store.bot = new eris(config.BOT_TOKEN);

store.bot.on("ready", middleware.ready);

store.bot.connect();

// minus_one:593601353977430016
// plus_one:593601354963091476

Array.prototype.remove = function() {
    var what, a = arguments, L = a.length, ax;
    while (L && this.length) {
        what = a[--L];
        while ((ax = this.indexOf(what)) !== -1) {
            this.splice(ax, 1);
        }
    }
    return this;
};

function sendNewDay(){
    if(new Date().getHours() > 10)
        store.bot.createMessage("593007704512135178", helpers.thinEmbed(0x00ff00, "New day! Mission counter reset -"));
}

// check for a new day every 10 minutes
setInterval(sendNewDay, 1000*60*10);
Replies: >>40
>>36 (OP) 

fs.readdirSync("./middleware/").forEach(file=>{
			const event = reload("./middleware/"+file);
			startupLog = print(startupLog, "[MAIN] Loaded middleware "+event.name);
			store.bot.on(event.name, event.main);
		});
>>38
store.bot.on("ready", middleware.ready);
into
store.bot.once("ready", middleware.ready);
.once to only fire once 3Head
Youre a nigger.webm
(291.6KB, 1280x720, 00:07)
Sorry, couldn't find a QTDDTOT thread, so I'll post this here instead.

I'm a C++ developer and I'd like to start a thread here blogposting about my little project. But I've noticed that on most /tech/ boards there's (what I considered to be) an unhealthy fascination with C to the exclusion of all other languages--'especially' C++. 

Now I have a thick skin and can easily point out C++ is superior to C, but frankly it's a distraction from work and more importantly, I don't want to annoy the BO here if he also shares this widely-held misconception about the superiority of C.
Replies: >>55
>>54
> I want to blogpost
You are free to blogpost, make a thread.

>Dont want to annoy BO because i prefer C++
I have used C in the past, never C++ but have no preference. Actually if I had to use one now C++ might be my choice so you certainly won't annoy me.
That said, this could be some joke post from what ive seen in the past on various /tech/ boards where people love talking up C. Im not good with recognising jokes, maybe I'm retarded.
Replies: >>69
test
>>55
OK, I'll plan on something here shortly then.

Connecting...
Show Post Actions

Actions:

Staff Actions:

Captcha:

- rules - faq - source code -