fix ratelimit
This commit is contained in:
parent
efc138e117
commit
0030ee4dd4
1 changed files with 9 additions and 9 deletions
|
@ -29,15 +29,6 @@ export default class Commands {
|
|||
return
|
||||
}
|
||||
|
||||
const args = message
|
||||
.substring(this.#prefix.length)
|
||||
.split(" ")
|
||||
|
||||
// Just to be safe
|
||||
if (args.length < 1) {
|
||||
return
|
||||
}
|
||||
|
||||
let ratelimit = this.#ratelimit.get(username)
|
||||
if (ratelimit === undefined) {
|
||||
ratelimit = 0
|
||||
|
@ -50,6 +41,15 @@ export default class Commands {
|
|||
return
|
||||
}
|
||||
|
||||
const args = message
|
||||
.substring(this.#prefix.length)
|
||||
.split(" ")
|
||||
|
||||
// Just to be safe
|
||||
if (args.length < 1) {
|
||||
return
|
||||
}
|
||||
|
||||
for (const command of this.#commands) {
|
||||
if (command.name !== args[0]) {
|
||||
continue
|
||||
|
|
Loading…
Add table
Reference in a new issue