Doing stuff :)
This commit is contained in:
parent
2fc53362c4
commit
4902a49332
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -132,3 +132,5 @@ dist
|
|||
config.json
|
||||
config.json.old
|
||||
config.json.disabled
|
||||
|
||||
test.js
|
14
embeds.json
Normal file
14
embeds.json
Normal file
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"_comment": "This file is a work in progress, and is currently unused. To be used later :)",
|
||||
"extInfo": {
|
||||
"title": "LiteNet Phone Systems",
|
||||
"description": "This is the full extension list for our community phone system!",
|
||||
"color": 65535,
|
||||
"fields": [
|
||||
{
|
||||
"name": "Extensions",
|
||||
"value": "this gets replaced in code"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
10
index.js
10
index.js
|
@ -165,7 +165,7 @@ const findNextExtension = () => {
|
|||
// Look out for gaps in the extension numbers, if there are any, use that one, if not, use the highest + 1
|
||||
var exts = [];
|
||||
result.fetchAllExtensions.extension.forEach((ext) => {
|
||||
exts.push(ext.user.extension);
|
||||
exts.push(Number(ext.user.extension));
|
||||
});
|
||||
exts.sort((a, b) => a - b);
|
||||
// Start should be the lowest extension. If none exists use config value
|
||||
|
@ -423,4 +423,12 @@ dcClient.on('interactionCreate', async interaction => {
|
|||
}
|
||||
});
|
||||
|
||||
pbxClient.request(funcs.generateQuery('list', {})).then((result) => {
|
||||
console.log(JSON.stringify(result, null, 2));
|
||||
}).catch((error) => {
|
||||
console.log(error);
|
||||
});
|
||||
|
||||
/*
|
||||
dcClient.login(config.discord.token);
|
||||
*/
|
Loading…
Reference in a new issue