コード例 #1
0
        /// <summary>
        ///     Modifies this <see cref="RestApplicationCommand"/>.
        /// </summary>
        /// <param name="func">The delegate containing the properties to modify the command with.</param>
        /// <param name="options">The options to be used when sending the request.</param>
        /// <returns>
        ///     The modified command.
        /// </returns>
        public override async Task ModifyAsync <TArg>(Action <TArg> func, RequestOptions options = null)
        {
            var cmd = await InteractionHelper.ModifyGlobalCommandAsync(Discord, this, func, options).ConfigureAwait(false);

            Update(cmd);
        }
コード例 #2
0
        public static async Task <RestGlobalCommand> ModifyGlobalApplicationCommandAsync(BaseDiscordClient client, IApplicationCommand command, ApplicationCommandProperties args, RequestOptions options = null)
        {
            var model = await InteractionHelper.ModifyGlobalCommandAsync(client, command, args, options);

            return(RestGlobalCommand.Create(client, model));
        }