Commands
Command Options
Options in Discord commands are required to have a description. Additionally, for all options, we can set whether they are required and include a function to transform their value.
Option Types
The possible types of options in a command are as follows:
Text
import { , , } from 'seyfert';
@({
: ({
: '',
}),
/// Fixed choices
: ({
: '',
: [
{ : 'The best library', : 'seyfert' },
{ : 'An odd stuff', : 'meowdb' },
] as ,
}),
/// Autocomplete
: ({
: '',
: () => {
// logic here
const = ['bugs', 'actions', 'random'];
const = .();
return .(
.(() => .())
.(() => ({ : , : }))
);
},
}),
/// Character limits
: ({
: '',
: 500,
: 200,
}),
})
class extends {}import { , , , } from 'seyfert';
const = {
/// Fixed choices
: ({
: '',
: [
{ : 'The best library', : 'seyfert' },
{ : 'An odd stuff', : 'meowdb' },
] as ,
}),
};
@()
class extends {
async (: <typeof >) {
..best; }
}Integers
import { , , } from 'seyfert';
@({
: ({
: '',
}),
/// Fixed choices
: ({
: '',
: [
{ : 'seyfert', : 1 },
{ : 'potocuit', : 2 },
{ : 'biscuit', : 3 }
]
}),
/// Autocomplete
: ({
: '',
: () => {
const = ['1651611', '4616165156549', '15616416515616'];
const = .();
return .(
.(() => .())
.(() => ({ : , : () }))
);
}
}),
/// Value limits
: ({
: '',
: 500,
: 200
})
})
class extends {}Numbers
import { , , } from 'seyfert';
@({
: ({
: '',
}),
// Same logic as integers but applies to all numbers, including decimals
})
class extends {}Channels
import { , , } from 'seyfert';
import { } from 'seyfert/lib/types';
@({
: ({
: '',
}),
/// Specific channel type
: ({
: 'This is a limited channel option',
: [.]
})
})
class extends {}Booleans
import { , , } from 'seyfert';
@({
: ({
: 'This is a boolean option',
: true
})
})
class extends {}Users
import { , , } from 'seyfert';
@({
: ({
: 'This is a user option',
: true
})
})
class extends {}Roles
import { , , } from 'seyfert';
@({
: ({
: 'This is a role option',
: true
})
})
class extends {}Mentionables
import { , , } from 'seyfert';
@({
: ({
: 'This is a mentionable option',
: true
})
})
class extends {}Attachments
import { , , } from 'seyfert';
@({
: ({
: 'This is an attachment option',
: true
})
})
class extends {}