Beispiel #1
0
        public static async Task <RestUserMessage> ModifyMessageAsync(IMessageChannel channel, ulong messageId, Action <MessageProperties> func,
                                                                      BaseDiscordClient client, RequestOptions options)
        {
            var msgModel = await MessageHelper.ModifyAsync(channel.Id, messageId, client, func, options).ConfigureAwait(false);

            return(RestUserMessage.Create(client, channel, msgModel.Author.IsSpecified ? RestUser.Create(client, msgModel.Author.Value) : client.CurrentUser, msgModel));
        }
Beispiel #2
0
        /// <inheritdoc />
        public async Task ModifyAsync(Action <MessageProperties> func, RequestOptions options = null)
        {
            var model = await MessageHelper.ModifyAsync(this, Discord, func, options).ConfigureAwait(false);

            Update(model);
        }