DiSky DiSky v5.0.0-b1

Welcome screen

guide

Read the welcome screen of a community guild and replace its description and channels.

guildwelcome-screenbuilder

This page covers the welcome screen: the card a community guild shows to new members, with a description and up to five recommended channels. You're assumed to have a bot named "my-bot" logged in, a guild with Community enabled, and Manage Server for the bot if it edits the screen.

Reading the welcome screen

asks Discord for the current screen, so it requires await. What comes back is a snapshot: it does not change when the screen is edited, read it again for that.

on message received seen by "my-bot":
    if discord content of event-message is "!welcome":
        await set {_screen} to the welcome screen of event-guild
        reply with "%description of {_screen}%"
        loop welcome channels of {_screen}:
            reply with "%welcome channel of loop-value%: %description of loop-value% %emoji of loop-value%"

Each entry of welcome channels is a welcomechannel with three properties: (the channel itself, none if the bot cannot see it), and , the emoji as it renders in a message.

property welcome screenGuild[the] welcome screen of %guild%The welcome screen of the guild, fetched online, so it requires 'await'.Welcome Screensince 5.0.0-a2

Editing the welcome screen

Editing goes through a builder, but not the usual one: the welcome screen already exists, so there is nothing to build. Create it with , set what you want to change, then send it with . That effect waits for Discord, so the next line already sees the new screen.

on message received seen by "my-bot":
    if discord content of event-message is "!set-welcome":
        set {_rules} to a new welcome channel for event-channel with description "Read the rules" with emoji "📜"
        set {_b} to a new welcome screen builder for event-guild
        set welcome screen enabled of {_b} to true
        set description of {_b} to "Welcome to the guild!"
        set welcome channels of {_b} to {_rules}
        update the welcome screen using {_b}

Only the properties you set are sent; the others keep their value on Discord.

effect update welcome screenWelcome Screen Builderupdate [the] welcome screen using %welcomescreenbuilder%Sends a welcome screen builder to Discord, applying every field that was set on it.since 5.0.0-a2

Options

Property

Default

Accepted values

unchanged

true, false

unchanged

a text

unchanged

up to 5 welcome channels; set, add, remove, delete

creates one entry. The description is 42 characters at most, the emoji is optional (a unicode emoji, an emote, or the <:name:id> form of a custom one), and the channel must be a text, voice, stage, news or forum channel: a category or a thread is refused. An entry never changes once created; make a new one to change it.

A fresh builder starts empty

welcome channels on a builder replaces the whole list on Discord, and a new builder does not start from the current screen. To add one channel to the existing list, read the screen first and copy its channels onto the builder, as below.

on message received seen by "my-bot":
    if discord content of event-message is "!add-welcome":
        await set {_screen} to the welcome screen of event-guild
        set {_b} to a new welcome screen builder for event-guild
        set welcome channels of {_b} to welcome channels of {_screen}
        add (a new welcome channel for event-channel with description "Say hi") to welcome channels of {_b}
        update the welcome screen using {_b}

remove takes an entry and drops every entry pointing to the same channel, whatever its description. delete welcome channels of {_b} empties the list, which clears it on Discord once the builder is sent.

expression new welcome channelWelcome Channel[a] new welcome channel for [the] [channel] %guildchannel% (with|and) [the] description %string% [(with|and) [the] emoji %-emote/string%]Creates a welcome screen entry. The description is at most 42 characters; the channel must be a text, voice, stage, news or forum channel (not a category or thread).Welcome Channelsince 5.0.0-a2

Errors you may see

Message (console)

Cause

Fix

A Discord error when reading the screen

The guild is not a community guild, or has never set up a welcome screen

Enable Community in the guild settings

the channel '...' cannot be put on a welcome screen

The entry points to a category or a thread

Use a text, voice, stage, news or forum channel

[50035] Invalid Form Body naming welcome_channels

More than 5 entries, or a description over 42 characters

Trim the list or the description

A Discord error naming Missing Permissions

The bot lacks Manage Server

Grant it

Welcome Screen Builder type 5 syntaxes A pending edit of a guild's welcome screen. Only the fields you set are sent. Nothing reaches Discord until you use 'update the welcome screen using'. Welcome channels set on a builder replace the whole list on Discord.
Was this page helpful?
An unhandled error has occurred. Reload 🗙

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.