Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
32 additions
and
0 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
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// Create a single client | ||
|
||
const DiscordRSS = require('./index.js') | ||
const drss = new DiscordRSS.Client() // Override default config values here | ||
|
||
drss.login(require('./config.js').bot.token, true) | ||
|
||
drss.on('finishInit', () => { | ||
// Do whatever once the bot has finished initialization | ||
}) |
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// Only create the Sharding Manager | ||
|
||
const DiscordRSS = require('./index.js') | ||
const Discord = require('discord.js') | ||
const shardingManager = new Discord.ShardingManager('./server-shard.js', { respawn: false }) | ||
const shardedDiscordRSSClient = new DiscordRSS.ClientSharded(shardingManager, { readFileSchedules: true, setPresence: true, forceSharded: true }) | ||
|
||
shardedDiscordRSSClient.run() | ||
|
||
shardedDiscordRSSClient.on('finishInit', () => { | ||
// Do whatever once the sharding manager has finished spawning and waiting for all shards to finish initialization | ||
}) |
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
// Create a single client | ||
|
||
const DiscordRSS = require('./index.js') | ||
const drss = new DiscordRSS.Client() // Override default config values here | ||
|
||
drss.login(require('./config.js').bot.token, true) |
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