mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
switch to node-fetch (#2587)
* switch to node-fetch
* remove useless var declaration
* remove method uppercasing
* rework concurrency
* Revert "rework concurrency"
This reverts commit ef6aa2697e.
* fix headers
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
const Discord = require('../');
|
||||
const { token } = require('./auth');
|
||||
|
||||
const sharder = new Discord.ShardingManager(`${process.cwd()}/test/shard.js`, 4, false);
|
||||
const sharder = new Discord.ShardingManager(`${process.cwd()}/test/shard.js`, { token, respawn: false });
|
||||
|
||||
sharder.on('launch', shard => console.log(`launched ${shard.id}`));
|
||||
|
||||
sharder.spawn(4);
|
||||
sharder.spawn();
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<meta charset="utf-8" />
|
||||
</head>
|
||||
<body>
|
||||
<script type="text/javascript" src="../webpack/discord.min.js"></script>
|
||||
<script type="text/javascript" src="../webpack/discord.js"></script>
|
||||
<script type="text/javascript">
|
||||
(() => {
|
||||
const client = window.client = new Discord.Client();
|
||||
@@ -25,7 +25,7 @@
|
||||
});
|
||||
|
||||
client.login(localStorage.token || window.token || prompt('token pls', 'abcdef123456'))
|
||||
.then((token) => localStorage.token = token);
|
||||
.then((token) => localStorage.token = token, console.log);
|
||||
})();
|
||||
</script>
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user