audit fix; add n. guilds stat
This commit is contained in:
parent
c6d37cd81e
commit
a6ea1188b8
7 changed files with 217 additions and 157 deletions
|
|
@ -14,11 +14,13 @@ See the License for the specific language governing permissions and
|
|||
limitations under the License.
|
||||
*/
|
||||
|
||||
import "./initConfig";
|
||||
import init from "./initConfig";
|
||||
|
||||
import commandList from "./commandList";
|
||||
import { REST, Routes } from 'discord.js';
|
||||
|
||||
init();
|
||||
|
||||
function registerGlobal(rest: REST, clientId: string, commands: any){
|
||||
rest.put(Routes.applicationCommands(clientId), { body: commands })
|
||||
.then(() => { console.log(`Successfully registered ${commands.length} / commands globally. Please wait until 2 hours before they are updated`); })
|
||||
|
|
@ -52,4 +54,5 @@ if (guilds.length === 0){
|
|||
registerGlobal(rest, clientId, commands);
|
||||
} else {
|
||||
registerLocal(rest, clientId, commands, guilds);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue