// only works when there is no task running | |
// because we have a server always listening port, this handler will NEVER execute | |
process.on("beforeExit", (code) => { | |
console.log("Process beforeExit event with code: ", code); | |
}); | |
// only works when the process normally exits | |
// on windows, ctrl-c will not trigger this handler (it is unnormal) | |
// unless you listen on 'SIGINT' | |
process.on("exit", (code) => { |
There are two metrics that are important to consider when discussing the size of Docker images.
- Compressed size - This is often referred to as the wire size. This affects how fast/slow images can be pulled from a registry. This impacts the first run experience on machines where images are not cached.
- Uncompressed size - This is often referred to as the size on disk. This affects how much local storage is required to support your Docker workloads.
The example commands shown below will work on Windows, MacOS, and Linux.
let Endpoints = require("eris/lib/rest/Endpoints"); | |
Object.defineProperties(Eris.Client.prototype, { | |
fetchChannel: { | |
value: function(channelID) { | |
return this.requestHandler.request("GET", Endpoints.CHANNEL(channelID), true).then((channel) => { | |
if (channel.type === 0) { | |
return new Eris.TextChannel(channel, null, this.options.messageLimit); | |
} else if (channel.type === 1) { | |
return new Eris.PrivateChannel(channel, this); | |
} else if (channel.type === 2) { |
Recently more and more chatbots appear, the overall chatbot market grows and the platform for it grows as well. Today we are taking a close look at what benefits creating a microservice chatbot on Discord - (a communication platform mainly targeted at gamers) would provide.
The concepts and ideas explained in this whitepaper are geared towards bots with a bigger userbase where the limits of a usual bot style appear with a greater effect
(If you are already proficient with the Discord API and the way a normal bot works, you may skip ahead to The Concept)
To remove a submodule you need to:
- Delete the relevant section from the .gitmodules file.
- Stage the .gitmodules changes git add .gitmodules
- Delete the relevant section from .git/config.
- Run git rm --cached path_to_submodule (no trailing slash).
- Run rm -rf .git/modules/path_to_submodule (no trailing slash).
- Commit git commit -m "Removed submodule "
- Delete the now untracked submodule files rm -rf path_to_submodule