// TODO: Not functional: public bool ModifyUser(TokenResponse tokenResponse, ModifyGuildMember modification, string guildId, string userId) { throw new Exception("ModifyUser is not functional yet."); /*using (WebClient client = new WebClient()) * { * client.Headers.Add(HttpRequestHeader.Authorization, tokenResponse.Type + " " + tokenResponse.AccessToken); * try * { * IDiscordUriBuilder uriBuilder = new DiscordUriBuilder(); * string uri = uriBuilder.AddPath(string.Format("guilds/{0}/members/{1}", guildId, userId)) * .Build(); * * string json = serializer.Serialize(modification); * * string response = client.UploadString(uri, "PATCH", json); * * if (response == "") * { * return true; * } * } * catch (Exception) { } * * return false; * }*/ }
/// <inheritdoc /> public virtual Task ModifyGuildMemberNickname(string guildId, string userId, ModifyGuildMember modifyGuildMember) { var arguments = new object[] { guildId, userId, modifyGuildMember }; return((Task)methodImpls["ModifyGuildMemberNickname"](Client, arguments)); }
public static void ModifyGuildMember(string guildId, string userId, ModifyGuildMember modify) { IGuildService guildservice = AuthenticatedRestFactory.GetGuildService(); guildservice.ModifyGuildMember(guildId, userId, modify); }
/// <inheritdoc /> public virtual Task <GuildMember> ModifyCurrentUserNickname(string guildId, ModifyGuildMember member) { var arguments = new object[] { guildId, member }; return((Task <GuildMember>)methodImpls["ModifyCurrentUserNickname"](Client, arguments)); }