@discord-types/builders/attachment
API reference for @discord-types/builders/attachment
@discord-types/builders/attachment
Types
Attachment
Raw Type
type Attachment = Attachment.Prototype, & {
attachmentId: string?,
filename: string?,
description: string?,
content: {Primitives.u8}?
}
Intersection with variants:
Variant 2
Prop | Type | Description |
---|---|---|
attachmentId? | - | |
filename? | - | |
description? | - | |
content? | - |
JSON
Raw Type
type JSON = Attachment.Prototype.build(nil :: any),
Functions
Attachment.Prototype.setId
[[ Set the ID of the Attachment to use. ]]
Function Signature
--[[
Set the ID of the Attachment to use.
]]
function Attachment.Prototype.setId(self: Attachment, attachmentId: string?) -> Attachment end
Arguments
attachmentId
This field is optional and may not be specified
Returns
ret1
Attachment.Prototype.setFilename
[[ pub filename: String, pub description: Option<String>, pub content: Vec<u8>, ]]
[[ Set the filename of the Attachment to use. ]]
Function Signature
--[[
pub filename: String,
pub description: Option<String>,
pub content: Vec<u8>,
]]
--[[
Set the filename of the Attachment to use.
]]
function Attachment.Prototype.setFilename(self: Attachment, filename: string) -> Attachment end
Arguments
filename
Returns
ret1
Attachment.Prototype.setDescription
[[ Set the description of the Attachment to use. ]]
Function Signature
--[[
Set the description of the Attachment to use.
]]
function Attachment.Prototype.setDescription(self: Attachment, description: string?) -> Attachment end
Arguments
description
This field is optional and may not be specified
Returns
ret1
Attachment.Prototype.setContent
[[ Set the content of the Attachment to use. ]]
Function Signature
--[[
Set the content of the Attachment to use.
]]
function Attachment.Prototype.setContent(self: Attachment, content: {Primitives.u8}) -> Attachment end
Arguments
content
{Primitives.u8}
Returns
ret1
Attachment.Prototype.build
[[ Responsible for building the Attachment JSON that can be parsed by the Discord API. ]]
Function Signature
--[[
Responsible for building the Attachment JSON that can be parsed by the Discord API.
]]
function Attachment.Prototype.build(self: Attachment) -> JSON end
Returns
ret1
Attachment.Interface.new
[[ Responsible for creating a new Attachment.
```lua
``` ]]
Function Signature
--[[
Responsible for creating a new Attachment.
\`\`\`lua
\`\`\`
]]
function Attachment.Interface.new(resource: {
attachmentId: string?,
filename: string?,
description: string?,
content: {u8}?
}?) -> Attachment end
Arguments
resource
This field is optional and may not be specified
{attachmentId: string?, filename: string?, description: string?, content: {u8}?}?
Returns
ret1
Last updated on