Name | discordmessage |
Related Guide Page | https://guide.denizenscript.com/guides/expanding/ddiscordbot.html |
Syntax | discordmessage (id:<id>) [reply:<message>/edit:<message>/channel:<channel>/user:<user>] (<message>) (no_mention) (rows:<rows>) (embed:<embed>|...) (attach_files:<map>) (post_title:<name>) |
Short Description | Sends a message to a Discord channel. |
Full Description | Sends a message to a Discord channel.
Command may fail if the bot does not have permission within the Discord group to send a message in that channel. You can send the message to: a channel, user, or in reply to a previous message. If sending as a reply, optionally use "no_mention" to disable the default reply pinging the original user. Channels can be specified as either a copied ID, or using any tag that returns a valid DiscordChannelTag. To get IDs, enable "Developer Mode" in your Discord settings, then right click on the channel and press "Copy ID". You can edit an existing message by using "edit:<message>". You can use "attach_file_name:<name>" and "attach_file_text:<text>" to attach a text file with longer content than a normal message allows. Alternatively, you can use "attach_files:<map>" to attach files as a MapTag of the name of the file to the text or a BinaryTag. To send embeds, use "embed:<embed>|...". You can use "rows" to attach action rows of components, such as buttons to the message, using DiscordButtonTag, and DiscordSelectionTag. You can send a message into a Forum Channel with "post_title" specified to create a post in that forum. The command can be ~waited for. See ~waitable. |
Related Tags | <entry[saveName].message> returns the DiscordMessageTag of the sent message, when the command is ~waited for.
<discord[mybot].group[Denizen].channel[bot-spam]> is an example of a tag that will return an appropriate channel object for a named channel in a named group.
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Group | external |
Requires | dDiscordBot |
Source | https://github.com/DenizenScript/dDiscordBot/blob/master/src/main/java/com/denizenscript/ddiscordbot/commands/DiscordMessageCommand.java#L43 |