This repository has been archived by the owner on May 7, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Command
Benbebop edited this page Feb 21, 2023
·
10 revisions
extends Snowflake
Represents an Application Command.
Instances of this class should not be constructed by users.
Properties Inherited From Snowflake
Name | Type | Description |
---|---|---|
client | Client | A shortcut to the client object to which this container is visible. |
createdAt | number | The Unix time in seconds at which this object was created by Discord. Additional decimal points may be present, though only the first 3 (milliseconds) should be considered accurate. Equivalent to Date.parseSnowflake(Snowflake.id) . |
id | string | The Snowflake ID that can be used to identify the object. This is guaranteed to be unique except in cases where an object shares the ID of its parent. |
parent | Container/Client | The parent object of to which this container is a child. For example, the parent of a role is the guild in which the role exists. |
timestamp | string | The date and time at which this object was created by Discord, represented as an ISO 8601 string plus microseconds when available. Equivalent to Date.fromSnowflake(Snowflake.id):toISO() . |
Name | Type | Description |
---|---|---|
name | string | The name of the command. This should be between 1 and 32 characters in length. |
description | string | The command's description. Idk how long this should be, figure out yourself. |
guild | nil/string/Guild | The snowflake id/object of the guild this command belongs to, if it is a guild command. |
type | number | The command type. See the applicationCommandType enumeration for a human-readable representation. |
options | table | A table of all options attached to this command. |
nsfw | boolean | Whether this command is marked as NSFW (not safe for work). |
version | string | Legit no idea XD. |
Methods Inherited From Snowflake
Defines the behavior of the ==
operator. Allows containers to be directly compared according to their type and __hash
return values.
Returns: boolean
Returns Snowflake.id
Returns: string
Defines the behavior of the tostring
function. All containers follow the format ClassName: hash
.
Returns: string
Returns a unique Date object that represents when the object was created by Discord. Equivalent to Date.fromSnowflake(Snowflake.id)
This method only operates on data in memory.
Returns: Date
Parameter | Type |
---|---|
optionType | number |
name | string |
This method always makes an HTTP request at the end of the event loop.
Returns: Option