Update eslintrc.json to also make it consider typings
note that I've marked Promises awaiting as a warn, because I don't want to be bothered with it for now. I also edited all files to accomodate with the new rules. I should also think find a way to type-safely import Commands directory, another time
This commit is contained in:
parent
c4676175ff
commit
7225739527
9 changed files with 35 additions and 23 deletions
|
@ -14,6 +14,7 @@ requireDirectory<{default: Command}, void>(module, "../commands", {
|
|||
console.log(obj);
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call
|
||||
post.push(new obj.default().toRESTPostApplicationCommands());
|
||||
},
|
||||
});
|
||||
|
@ -22,7 +23,7 @@ const rest = new REST().setToken(config.tokens.Discord);
|
|||
|
||||
(async () => {
|
||||
const me = await rest.get(Routes.oauth2CurrentApplication()) as RESTGetAPIOAuth2CurrentApplicationResult;
|
||||
if (guildId && guildId != "") {
|
||||
if (guildId && guildId !== "") {
|
||||
console.log(`Started refreshing ${post.length} application guild (${guildId}) commands.`);
|
||||
await rest.put(
|
||||
Routes.applicationGuildCommands(me.id, guildId),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue