Esempio n. 1
0
    public async Task AddAsync(SocketUserMessage message, IRole role, IEmote?emote = null)
    {
        var componentBuilder = ComponentBuilder.FromComponents(message.Components);

        componentBuilder.WithButton(
            $"@{role.Name}",
            emote: emote,
            customId: $"{Prefix}-{message.Id}-{role.Id}",
            style: ButtonStyle.Secondary);

        await message.ModifyAsync(properties => properties.Components = componentBuilder.Build());

        await RespondAsync($"Added role {role.Mention} to message: **{message.Id.ToString()}**.", ephemeral : true);
    }