-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add: GraphQL API (with OAuth2 and Discord integration)
- Loading branch information
Showing
29 changed files
with
2,004 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,13 @@ | ||
require("dotenv").config(); | ||
const { ShardingManager } = require("discord.js"); | ||
const api = require("./src/api/api"); | ||
|
||
const manager = new ShardingManager("./bot.js", { token: process.env.TOKEN, shardArgs: process.argv.slice(2, 4) }); | ||
require("dotenv").config(); | ||
|
||
manager.on("shardCreate", shard => console.log(`! Launched shard ${shard.id}`)); | ||
manager.spawn(Number(process.env.SHARDS), 1, 60000); | ||
if (process.argv.includes("--api")) { | ||
api(); | ||
} else { | ||
const manager = new ShardingManager("./bot.js", { token: process.env.TOKEN, shardArgs: process.argv.slice(2, 4) }); | ||
api(manager); | ||
manager.on("shardCreate", shard => console.log(`! Launched shard ${shard.id}`)); | ||
manager.spawn(Number(process.env.SHARDS), 1, 60000); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.