mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 15:07:42 +02:00
Fix
This commit is contained in:
+2
-2
@@ -6,12 +6,12 @@ module.exports = class CodeArgumentType extends ArgumentType {
|
||||
super(client, 'code');
|
||||
}
|
||||
|
||||
async validate(value) {
|
||||
validate(value) {
|
||||
if (!value) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
parse(value, msg) {
|
||||
async parse(value, msg) {
|
||||
if (!value) return null;
|
||||
if (/^[0-9]+$/.test(value)) {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user