Files
discord.js/test/webpack.html
Gus Caplan 27ccad1f1c tinify webpacks (#1975)
* tinify webpack

* meme

* fix long version

* more changes

* even smoler

* fix up logic

* fix build

* undo changes to user agent manager because its not webpack'd anymore

* the heck

* fix stupid

* clean up browser rules

* typo
2017-09-26 07:18:12 +02:00

35 lines
969 B
HTML

<!DOCTYPE html>
<html>
<head>
<title>discord.js Webpack test</title>
<meta charset="utf-8" />
</head>
<body>
<script type="text/javascript" src="../webpack/discord.12.0.0-dev.js"></script>
<script type="text/javascript" src="auth.js"></script>
<script type="text/javascript">
(() => {
const client = window.client = new Discord.Client();
client.on('ready', () => {
console.log('[CLIENT] Ready!');
});
client.on('debug', console.log);
client.on('error', console.error);
client.on('debug', console.info);
client.ws.on('close', (event) => console.log('[CLIENT] Disconnect!', event));
client.on('message', (message) => {
console.log(message.author.username, message.author.id, message.content);
});
client.login(localStorage.token || window.token || prompt('token pls', 'abcdef123456'))
.then((token) => localStorage.token = token);
})();
</script>
</body>
</html>