-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
a8fd876
commit 3cbd663
Showing
35 changed files
with
491 additions
and
1,075 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 |
---|---|---|
@@ -0,0 +1 @@ | ||
/node_modules/ |
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,20 @@ | ||
const { prefix } = require('./settings.json'); | ||
|
||
module.exports = (client, aliases, callback) => { | ||
if (typeof aliases === 'string') { | ||
aliases = [aliases] | ||
} | ||
|
||
client.on('message', message => { | ||
const { content } = message; | ||
|
||
aliases.forEach(alias => { | ||
const command = `${prefix}${alias}` | ||
|
||
if (content.startsWith(`${command}`) || content === command) { | ||
console.log(`Running the command ${command}`); | ||
callback(message) | ||
} | ||
}) | ||
}) | ||
} |
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,24 @@ | ||
const axios = require('axios') | ||
const options = require('../options').options; | ||
module.exports = async(client) => { | ||
client.setInterval(async () => { | ||
count servers = []; | ||
let total = 0; | ||
for(const server of options.servers) { | ||
let players = await getPlayers(`${server.url}/players.json`); | ||
servers.push({ | ||
name: server.name, | ||
count: players.data.lenght, | ||
}) | ||
total =+ players.data.lenght, | ||
}; | ||
}, options.pollRate * 1000); | ||
} | ||
|
||
const getPlayers = async server => { | ||
try { | ||
return axios.get(`${server}/players.json`, { responseType:'json', timeout: 10000 }) | ||
} catch(e){ | ||
console.log(e); | ||
} | ||
}; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
10 changes: 8 additions & 2 deletions
10
node_modules/discord.js/src/client/voice/ClientVoiceManager.js
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.