Doing stuff :)

This commit is contained in:
Christopher Cookman 2023-03-20 18:49:57 -06:00
parent 2fc53362c4
commit 4902a49332
Signed by: ChrisChrome
GPG key ID: A023A26E42C33A42
3 changed files with 27 additions and 3 deletions

2
.gitignore vendored
View file

@ -132,3 +132,5 @@ dist
config.json
config.json.old
config.json.disabled
test.js

14
embeds.json Normal file
View 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"
}
]
}
}

View file

@ -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);
*/