Files
discord.js/test/webpack.html
Schuyler Cebulskie 419a2eea3f Bump version to 11.3.1
2018-03-03 15:38:24 -05:00

31 lines
832 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.11.3.1.min.js"></script>
<script type="text/javascript">
(() => {
const client = window.client = new Discord.Client();
client.on('ready', () => {
console.log('[CLIENT] Ready!');
});
client.on('error', console.error);
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>