示例#1
0
        public async Task <IActionResult> ModifyGuildEmbedAsync(Snowflake guildId, [FromBody] ModifyGuildEmbedParams args)
        {
            args.Validate();

            var embed = new GuildEmbed();

            if (args.ChannelId.IsSpecified)
            {
                embed.ChannelId = args.ChannelId.Value;
            }
            if (args.Enabled.IsSpecified)
            {
                embed.Enabled = args.Enabled.Value;
            }

            return(Ok(embed));
        }
示例#2
0
        /// <inheritdoc />
        public virtual Task <GuildEmbed> ModifyGuildEmbed(string guildId, GuildEmbed guildEmbed)
        {
            var arguments = new object[] { guildId, guildEmbed };

            return((Task <GuildEmbed>)methodImpls["ModifyGuildEmbed"](Client, arguments));
        }