Routes
ClassOn this page
Routes is a DiscordLua class representing a Discord resource. Obtain it from a manager, an event payload, or the constructor when one is documented below.
Methods
Performs application activity instance on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.applicationActivityInstance(applicationId, instanceId) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
applicationId |
string |
required | Snowflake id string. |
instanceId |
string |
required | Snowflake id string. |
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.applicationActivityInstance("123", "123")Performs application command on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.applicationCommand(applicationId, commandId) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
applicationId |
string |
required | Snowflake id string. |
commandId |
string |
required | Snowflake id string. |
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.applicationCommand("123", "123")Performs application command permissions on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.applicationCommandPermissions(applicationId, guildId, commandId) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
applicationId |
string |
required | Snowflake id string. |
guildId |
string |
required | Snowflake id string. |
commandId |
string |
required | Snowflake id string. |
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.applicationCommandPermissions("123", "123", "123")Performs application commands on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.applicationCommands(applicationId) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
applicationId |
string |
required | Snowflake id string. |
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.applicationCommands("123")Performs application current on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.applicationCurrent() Parameters
No parameters.
Returns
Routes — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Routes
Routes.applicationCurrent()Performs application emoji on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.applicationEmoji(applicationId, emojiId) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
applicationId |
string |
required | Snowflake id string. |
emojiId |
string |
required | Snowflake id string. |
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.applicationEmoji("123", "123")Performs application emojis on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.applicationEmojis(applicationId) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
applicationId |
string |
required | Snowflake id string. |
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.applicationEmojis("123")Performs application entitlements on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.applicationEntitlements(applicationId) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
applicationId |
string |
required | Snowflake id string. |
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.applicationEntitlements("123")Performs application guild command on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.applicationGuildCommand(applicationId, guildId, commandId) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
applicationId |
string |
required | Snowflake id string. |
guildId |
string |
required | Snowflake id string. |
commandId |
string |
required | Snowflake id string. |
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.applicationGuildCommand("123", "123", "123")Performs application guild commands on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.applicationGuildCommands(applicationId, guildId) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
applicationId |
string |
required | Snowflake id string. |
guildId |
string |
required | Snowflake id string. |
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.applicationGuildCommands("123", "123")Performs application role connection metadata on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.applicationRoleConnectionMetadata(applicationId) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
applicationId |
string |
required | Snowflake id string. |
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.applicationRoleConnectionMetadata("123")Performs audit log on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.auditLog(guildId) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
guildId |
string |
required | Snowflake id string. |
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.auditLog("123")Performs auto moderation rule on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.autoModerationRule(guildId, ruleId) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
guildId |
string |
required | Snowflake id string. |
ruleId |
string |
required | Snowflake id string. |
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.autoModerationRule("123", "123")Performs auto moderation rules on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.autoModerationRules(guildId) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
guildId |
string |
required | Snowflake id string. |
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.autoModerationRules("123")Performs channel on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.channel(channelId) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
channelId |
string |
required | Snowflake id string. |
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.channel("123")Performs channel bulk delete on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.channelBulkDelete(channelId) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
channelId |
string |
required | Snowflake id string. |
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.channelBulkDelete("123")Performs channel followers on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.channelFollowers(channelId) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
channelId |
string |
required | Snowflake id string. |
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.channelFollowers("123")Performs channel invites on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.channelInvites(channelId) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
channelId |
string |
required | Snowflake id string. |
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.channelInvites("123")Performs channel message on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.channelMessage(channelId, messageId) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
channelId |
string |
required | Snowflake id string. |
messageId |
string |
required | Snowflake id string. |
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.channelMessage("123", "123")Performs channel message all reactions on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.channelMessageAllReactions(channelId, messageId) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
channelId |
string |
required | Snowflake id string. |
messageId |
string |
required | Snowflake id string. |
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.channelMessageAllReactions("123", "123")Performs channel message crosspost on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.channelMessageCrosspost(channelId, messageId) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
channelId |
string |
required | Snowflake id string. |
messageId |
string |
required | Snowflake id string. |
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.channelMessageCrosspost("123", "123")Performs channel message own reaction on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.channelMessageOwnReaction(channelId, messageId, emoji) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
channelId |
string |
required | Snowflake id string. |
messageId |
string |
required | Snowflake id string. |
emoji |
any |
required | Passed through to the implementation as written. |
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.channelMessageOwnReaction("123", "123", emoji)Performs channel message reaction on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.channelMessageReaction(channelId, messageId, emoji) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
channelId |
string |
required | Snowflake id string. |
messageId |
string |
required | Snowflake id string. |
emoji |
any |
required | Passed through to the implementation as written. |
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.channelMessageReaction("123", "123", emoji)Performs channel message reactions on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.channelMessageReactions(channelId, messageId) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
channelId |
string |
required | Snowflake id string. |
messageId |
string |
required | Snowflake id string. |
Returns
Routes — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Routes
Routes.channelMessageReactions("123", "123")Performs channel messages on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.channelMessages(channelId) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
channelId |
string |
required | Snowflake id string. |
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.channelMessages("123")Performs channel messages pin on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.channelMessagesPin(channelId, messageId) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
channelId |
string |
required | Snowflake id string. |
messageId |
string |
required | Snowflake id string. |
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.channelMessagesPin("123", "123")Performs channel messages pins on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.channelMessagesPins(channelId) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
channelId |
string |
required | Snowflake id string. |
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.channelMessagesPins("123")Performs channel message user reaction on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.channelMessageUserReaction(channelId, messageId, emoji, userId) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
channelId |
string |
required | Snowflake id string. |
messageId |
string |
required | Snowflake id string. |
emoji |
any |
required | Passed through to the implementation as written. |
userId |
string |
required | Snowflake id string. |
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.channelMessageUserReaction("123", "123", emoji, "123")Performs channel permission on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.channelPermission(channelId, overwriteId) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
channelId |
string |
required | Snowflake id string. |
overwriteId |
string |
required | Snowflake id string. |
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.channelPermission("123", "123")Performs channel permissions on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.channelPermissions(channelId, overwriteId) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
channelId |
string |
required | Snowflake id string. |
overwriteId |
string |
required | Snowflake id string. |
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.channelPermissions("123", "123")Performs channel pins on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.channelPins(channelId) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
channelId |
string |
required | Snowflake id string. |
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.channelPins("123")Performs channel recipient on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.channelRecipient(channelId, userId) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
channelId |
string |
required | Snowflake id string. |
userId |
string |
required | Snowflake id string. |
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.channelRecipient("123", "123")Performs channels on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.channels() Parameters
No parameters.
Returns
Routes — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Routes
Routes.channels()Performs channel soundboard sound on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.channelSoundboardSound(channelId) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
channelId |
string |
required | Snowflake id string. |
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.channelSoundboardSound("123")Performs channel threads on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.channelThreads(channelId) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
channelId |
string |
required | Snowflake id string. |
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.channelThreads("123")Performs channel typing on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.channelTyping(channelId) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
channelId |
string |
required | Snowflake id string. |
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.channelTyping("123")Performs channel voice status on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.channelVoiceStatus(channelId) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
channelId |
string |
required | Snowflake id string. |
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.channelVoiceStatus("123")Performs channel webhooks on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.channelWebhooks(channelId) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
channelId |
string |
required | Snowflake id string. |
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.channelWebhooks("123")Performs consume entitlement on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.consumeEntitlement(applicationId, entitlementId) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
applicationId |
string |
required | Snowflake id string. |
entitlementId |
string |
required | Snowflake id string. |
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.consumeEntitlement("123", "123")Performs current application on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.currentApplication() Parameters
No parameters.
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.currentApplication()Performs current user on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.currentUser() Parameters
No parameters.
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.currentUser()Performs current user guilds on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.currentUserGuilds() Parameters
No parameters.
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.currentUserGuilds()Performs emoji on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.emoji(guildId, emojiId) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
guildId |
string |
required | Snowflake id string. |
emojiId |
string |
required | Snowflake id string. |
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.emoji("123", "123")Performs entitlement on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.entitlement(applicationId, entitlementId) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
applicationId |
string |
required | Snowflake id string. |
entitlementId |
string |
required | Snowflake id string. |
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.entitlement("123", "123")Performs entitlements on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.entitlements(applicationId) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
applicationId |
string |
required | Snowflake id string. |
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.entitlements("123")Performs expire poll on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.expirePoll(channelId, messageId) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
channelId |
string |
required | Snowflake id string. |
messageId |
string |
required | Snowflake id string. |
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.expirePoll("123", "123")Performs gateway on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.gateway() Parameters
No parameters.
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.gateway()Performs gateway bot on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.gatewayBot() Parameters
No parameters.
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.gatewayBot()Performs guild on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.guild(guildId) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
guildId |
string |
required | Snowflake id string. |
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.guild("123")Performs guild active threads on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.guildActiveThreads(guildId) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
guildId |
string |
required | Snowflake id string. |
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.guildActiveThreads("123")Performs guild application command permissions on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.guildApplicationCommandPermissions(applicationId, guildId) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
applicationId |
string |
required | Snowflake id string. |
guildId |
string |
required | Snowflake id string. |
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.guildApplicationCommandPermissions("123", "123")Performs guild audit log on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.guildAuditLog(guildId) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
guildId |
string |
required | Snowflake id string. |
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.guildAuditLog("123")Performs guild ban on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.guildBan(guildId, userId) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
guildId |
string |
required | Snowflake id string. |
userId |
string |
required | Snowflake id string. |
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.guildBan("123", "123")Performs guild bans on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.guildBans(guildId) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
guildId |
string |
required | Snowflake id string. |
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.guildBans("123")Performs guild bulk ban on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.guildBulkBan(guildId) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
guildId |
string |
required | Snowflake id string. |
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.guildBulkBan("123")Performs guild channels on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.guildChannels(guildId) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
guildId |
string |
required | Snowflake id string. |
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.guildChannels("123")Performs guild emoji on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.guildEmoji(guildId, emojiId) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
guildId |
string |
required | Snowflake id string. |
emojiId |
string |
required | Snowflake id string. |
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.guildEmoji("123", "123")Performs guild emojis on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.guildEmojis(guildId) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
guildId |
string |
required | Snowflake id string. |
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.guildEmojis("123")Performs guild incident actions on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.guildIncidentActions(guildId) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
guildId |
string |
required | Snowflake id string. |
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.guildIncidentActions("123")Performs guild integration on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.guildIntegration(guildId, integrationId) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
guildId |
string |
required | Snowflake id string. |
integrationId |
string |
required | Snowflake id string. |
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.guildIntegration("123", "123")Performs guild integrations on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.guildIntegrations(guildId) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
guildId |
string |
required | Snowflake id string. |
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.guildIntegrations("123")Performs guild invites on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.guildInvites(guildId) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
guildId |
string |
required | Snowflake id string. |
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.guildInvites("123")Performs guild member on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.guildMember(guildId, userId) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
guildId |
string |
required | Snowflake id string. |
userId |
string |
required | Snowflake id string. |
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.guildMember("123", "123")Performs guild member role on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.guildMemberRole(guildId, userId, roleId) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
guildId |
string |
required | Snowflake id string. |
userId |
string |
required | Snowflake id string. |
roleId |
string |
required | Snowflake id string. |
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.guildMemberRole("123", "123", "123")Performs guild members on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.guildMembers(guildId) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
guildId |
string |
required | Snowflake id string. |
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.guildMembers("123")Performs guild members search on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.guildMembersSearch(guildId) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
guildId |
string |
required | Snowflake id string. |
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.guildMembersSearch("123")Performs guild mfa on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.guildMFA(guildId) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
guildId |
string |
required | Snowflake id string. |
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.guildMFA("123")Performs guild onboarding on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.guildOnboarding(guildId) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
guildId |
string |
required | Snowflake id string. |
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.guildOnboarding("123")Performs guild preview on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.guildPreview(guildId) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
guildId |
string |
required | Snowflake id string. |
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.guildPreview("123")Performs guild prune on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.guildPrune(guildId) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
guildId |
string |
required | Snowflake id string. |
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.guildPrune("123")Performs guild role on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.guildRole(guildId, roleId) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
guildId |
string |
required | Snowflake id string. |
roleId |
string |
required | Snowflake id string. |
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.guildRole("123", "123")Performs guild role member counts on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.guildRoleMemberCounts(guildId) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
guildId |
string |
required | Snowflake id string. |
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.guildRoleMemberCounts("123")Performs guild roles on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.guildRoles(guildId) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
guildId |
string |
required | Snowflake id string. |
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.guildRoles("123")Performs guilds on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.guilds() Parameters
No parameters.
Returns
Routes — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Routes
Routes.guilds()Performs guild scheduled event on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.guildScheduledEvent(guildId, eventId) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
guildId |
string |
required | Snowflake id string. |
eventId |
string |
required | Snowflake id string. |
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.guildScheduledEvent("123", "123")Performs guild scheduled events on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.guildScheduledEvents(guildId) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
guildId |
string |
required | Snowflake id string. |
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.guildScheduledEvents("123")Performs guild scheduled event users on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.guildScheduledEventUsers(guildId, eventId) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
guildId |
string |
required | Snowflake id string. |
eventId |
string |
required | Snowflake id string. |
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.guildScheduledEventUsers("123", "123")Performs guild soundboard sound on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.guildSoundboardSound(guildId, soundId) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
guildId |
string |
required | Snowflake id string. |
soundId |
string |
required | Snowflake id string. |
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.guildSoundboardSound("123", "123")Performs guild soundboard sounds on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.guildSoundboardSounds(guildId) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
guildId |
string |
required | Snowflake id string. |
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.guildSoundboardSounds("123")Performs guild sticker on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.guildSticker(guildId, stickerId) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
guildId |
string |
required | Snowflake id string. |
stickerId |
string |
required | Snowflake id string. |
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.guildSticker("123", "123")Performs guild stickers on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.guildStickers(guildId) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
guildId |
string |
required | Snowflake id string. |
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.guildStickers("123")Performs guild template on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.guildTemplate(code) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
code |
any |
required | Passed through to the implementation as written. |
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.guildTemplate(code)Performs guild template guild on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.guildTemplateGuild(guildId, code) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
guildId |
string |
required | Snowflake id string. |
code |
any |
required | Passed through to the implementation as written. |
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.guildTemplateGuild("123", code)Performs guild templates on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.guildTemplates(guildId) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
guildId |
string |
required | Snowflake id string. |
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.guildTemplates("123")Performs guild vanity url on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.guildVanityUrl(guildId) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
guildId |
string |
required | Snowflake id string. |
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.guildVanityUrl("123")Performs guild vanity url on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.guildVanityURL(guildId) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
guildId |
string |
required | Snowflake id string. |
Returns
Routes — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Routes
Routes.guildVanityURL("123")Performs guild voice regions on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.guildVoiceRegions(guildId) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
guildId |
string |
required | Snowflake id string. |
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.guildVoiceRegions("123")Performs guild voice state on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.guildVoiceState(guildId, userId) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
guildId |
string |
required | Snowflake id string. |
userId |
string |
required | Snowflake id string. |
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.guildVoiceState("123", "123")Performs guild webhooks on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.guildWebhooks(guildId) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
guildId |
string |
required | Snowflake id string. |
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.guildWebhooks("123")Performs guild welcome screen on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.guildWelcomeScreen(guildId) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
guildId |
string |
required | Snowflake id string. |
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.guildWelcomeScreen("123")Performs guild widget on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.guildWidget(guildId) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
guildId |
string |
required | Snowflake id string. |
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.guildWidget("123")Performs guild widget image on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.guildWidgetImage(guildId) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
guildId |
string |
required | Snowflake id string. |
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.guildWidgetImage("123")Performs guild widget settings on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.guildWidgetSettings(guildId) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
guildId |
string |
required | Snowflake id string. |
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.guildWidgetSettings("123")Predicate that returns whether this Routes matches interactionCallback. Use it to branch before calling type-specific methods.
Signature
Routes.interactionCallback(interactionId, token) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
interactionId |
string |
required | Snowflake id string. |
token |
string |
optional | Bot token. When omitted, Client:login reads DISCORD_TOKEN. |
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.interactionCallback("123", os.getenv("DISCORD_TOKEN"))Predicate that returns whether this Routes matches invite. Use it to branch before calling type-specific methods.
Signature
Routes.invite(code) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
code |
any |
required | Passed through to the implementation as written. |
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.invite(code)Performs oauth2application on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.oauth2Application() Parameters
No parameters.
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.oauth2Application()Performs oauth2applications on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.oauth2Applications() Parameters
No parameters.
Returns
Routes — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Routes
Routes.oauth2Applications()Performs oauth2authorization on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.oauth2Authorization() Parameters
No parameters.
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.oauth2Authorization()Performs oauth2current application on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.oauth2CurrentApplication() Parameters
No parameters.
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.oauth2CurrentApplication()Performs oauth2current authorization on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.oauth2CurrentAuthorization() Parameters
No parameters.
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.oauth2CurrentAuthorization()Performs oauth2token exchange on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.oauth2TokenExchange() Parameters
No parameters.
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.oauth2TokenExchange()Performs oauth2token revocation on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.oauth2TokenRevocation() Parameters
No parameters.
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.oauth2TokenRevocation()Performs original interaction response on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.originalInteractionResponse(applicationId, token) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
applicationId |
string |
required | Snowflake id string. |
token |
string |
optional | Bot token. When omitted, Client:login reads DISCORD_TOKEN. |
Returns
Routes — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Routes
Routes.originalInteractionResponse("123", os.getenv("DISCORD_TOKEN"))Performs poll answer voters on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.pollAnswerVoters(channelId, messageId, answerId) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
channelId |
string |
required | Snowflake id string. |
messageId |
string |
required | Snowflake id string. |
answerId |
string |
required | Snowflake id string. |
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.pollAnswerVoters("123", "123", "123")Performs poll expire on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.pollExpire(channelId, messageId) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
channelId |
string |
required | Snowflake id string. |
messageId |
string |
required | Snowflake id string. |
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.pollExpire("123", "123")Performs query on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.query(params) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
params |
number |
required | Duration in milliseconds. |
Returns
Routes — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Routes
Routes.query(params)Send SoundboardSound using this Routes.
Signature
Routes.sendSoundboardSound(channelId) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
channelId |
string |
required | Snowflake id string. |
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.sendSoundboardSound("123")Performs skus on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.skus(applicationId) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
applicationId |
string |
required | Snowflake id string. |
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.skus("123")Performs sku subscription on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.skuSubscription(skuId, subscriptionId) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
skuId |
string |
required | Snowflake id string. |
subscriptionId |
string |
required | Snowflake id string. |
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.skuSubscription("123", "123")Performs sku subscriptions on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.skuSubscriptions(skuId) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
skuId |
string |
required | Snowflake id string. |
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.skuSubscriptions("123")Performs soundboard default sounds on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.soundboardDefaultSounds() Parameters
No parameters.
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.soundboardDefaultSounds()Performs stage instance on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.stageInstance(channelId) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
channelId |
string |
required | Snowflake id string. |
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.stageInstance("123")Performs stage instances on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.stageInstances() Parameters
No parameters.
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.stageInstances()Performs sticker on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.sticker(stickerId) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
stickerId |
string |
required | Snowflake id string. |
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.sticker("123")Performs sticker pack on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.stickerPack(packId) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
packId |
string |
required | Snowflake id string. |
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.stickerPack("123")Performs sticker packs on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.stickerPacks() Parameters
No parameters.
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.stickerPacks()Performs template on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.template(code) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
code |
any |
required | Passed through to the implementation as written. |
Returns
Routes — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Routes
Routes.template(code)Performs thread member on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.threadMember(threadId, userId) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
threadId |
string |
required | Snowflake id string. |
userId |
string |
required | Snowflake id string. |
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.threadMember("123", "123")Performs thread members on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.threadMembers(threadId) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
threadId |
string |
required | Snowflake id string. |
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.threadMembers("123")Performs user on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.user(userId) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
userId |
string |
required | Snowflake id string. |
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.user("123")Performs user application role connection on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.userApplicationRoleConnection(applicationId) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
applicationId |
string |
required | Snowflake id string. |
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.userApplicationRoleConnection("123")Performs user channels on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.userChannels() Parameters
No parameters.
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.userChannels()Performs user connections on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.userConnections() Parameters
No parameters.
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.userConnections()Performs user guild on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.userGuild(guildId) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
guildId |
string |
required | Snowflake id string. |
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.userGuild("123")Performs user guild member on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.userGuildMember(guildId) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
guildId |
string |
required | Snowflake id string. |
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.userGuildMember("123")Performs user guilds on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.userGuilds() Parameters
No parameters.
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.userGuilds()Performs user me on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.userMe() Parameters
No parameters.
Returns
Routes — the same instance, for chaining.
Example
local discord = require("discord")
-- object is a Routes
Routes.userMe()Performs voice regions on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.voiceRegions() Parameters
No parameters.
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.voiceRegions()Performs webhook on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.webhook(id, token) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
id |
string |
required | Snowflake id string. |
token |
string |
optional | Bot token. When omitted, Client:login reads DISCORD_TOKEN. |
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.webhook("123", os.getenv("DISCORD_TOKEN"))Performs webhook message on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.webhookMessage(applicationId, token, messageId) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
applicationId |
string |
required | Snowflake id string. |
token |
string |
optional | Bot token. When omitted, Client:login reads DISCORD_TOKEN. |
messageId |
string |
required | Snowflake id string. |
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.webhookMessage("123", os.getenv("DISCORD_TOKEN"), "123")Performs webhook platform on this Routes. Call it from bot code when you need that operation on the current object.
Signature
Routes.webhookPlatform(id, token, platform) Parameters
| Name | Type | Required | Behavior |
|---|---|---|---|
id |
string |
required | Snowflake id string. |
token |
string |
optional | Bot token. When omitted, Client:login reads DISCORD_TOKEN. |
platform |
any |
required | Passed through to the implementation as written. |
Returns
any.
Example
local discord = require("discord")
-- object is a Routes
Routes.webhookPlatform("123", os.getenv("DISCORD_TOKEN"), platform)Examples
Obtain this object from a manager, wrap helper, or event payload — it is not constructed directly in typical bot code.
Related APIs
ActionRow · Activity · ActivityInstance · ActivityLocation · AnonymousGuild · ApplicationCommand · ApplicationRoleConnectionMetadata · Attachment
Version: discord 1.2.4 · runtime 1.0.0