mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 00:23:30 +01:00
Updated Web Distrib management
This commit is contained in:
@@ -3,7 +3,7 @@ module.exports = function (grunt) {
|
||||
require('load-grunt-tasks')(grunt);
|
||||
|
||||
grunt.initConfig({
|
||||
|
||||
pkg: grunt.file.readJSON("package.json"),
|
||||
// define source files and their destinations
|
||||
babel: {
|
||||
dist: {
|
||||
@@ -19,7 +19,7 @@ module.exports = function (grunt) {
|
||||
browserify: {
|
||||
dist: {
|
||||
files: {
|
||||
'web-dist/discord.js': ["lib/index.js"],
|
||||
'web-dist/discord.<%= pkg.version %>.js': ["lib/index.js"],
|
||||
},
|
||||
options: {
|
||||
browserifyOptions: {
|
||||
@@ -31,7 +31,7 @@ module.exports = function (grunt) {
|
||||
uglify: {
|
||||
min: {
|
||||
files: {
|
||||
"./web-dist/discord.min.js": "./web-dist/discord.js"
|
||||
"./web-dist/discord.min.<%= pkg.version %>.js": "./web-dist/discord.js"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,18 +16,12 @@ mybot.on("message", function (message) {
|
||||
return;
|
||||
}
|
||||
|
||||
var action1 = mybot.sendMessage(message.channel, "this is message " + 1, true);
|
||||
var action2 = mybot.sendMessage(message.channel, "this is message " + 2).then(log);
|
||||
|
||||
function log() {
|
||||
mybot.updateMessage(action1.message, "blurg");
|
||||
mybot.sendMessage(message.channel, "This is message 3 million minus the million so basically just 3");
|
||||
mybot.deleteMessage(action1.message);
|
||||
mybot.sendMessage(message.channel, "This is message RJNGEIKGNER").then(log2);
|
||||
}
|
||||
// we can go ahead :)
|
||||
console.log(message.sender.username);
|
||||
mybot.sendMessage(message.channel, message.sender.username);
|
||||
});
|
||||
|
||||
mybot.on("ready", function(){
|
||||
mybot.on("ready", function () {
|
||||
console.log("im ready");
|
||||
})
|
||||
|
||||
|
||||
10
web-dist/README.md
Normal file
10
web-dist/README.md
Normal file
@@ -0,0 +1,10 @@
|
||||
## Web Distributions
|
||||
|
||||
Here you can find the latest web-ready distributions of discord.js. These distributions will allow you to run discord.js
|
||||
in your browser, which is very useful for making on-the-go bots or clients. For some reason, request times are also much
|
||||
shorter in browsers, so your bots will reply much faster.
|
||||
|
||||
Web Distributions aren't always fully functional, and sometimes catching errors is a pain. As discord.js's support for
|
||||
browserifying is still maturing, please don't expect that it will work out of the box just yet.
|
||||
|
||||
Also, if the versions in this folder are out-dated, you can always run `grunt web` to generate the latest library.
|
||||
File diff suppressed because it is too large
Load Diff
2
web-dist/discord.min.js
vendored
2
web-dist/discord.min.js
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user