コード例 #1
0
        // 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;
             * }*/
        }
コード例 #2
0
        /// <inheritdoc />
        public virtual Task ModifyGuildMemberNickname(string guildId, string userId, ModifyGuildMember modifyGuildMember)
        {
            var arguments = new object[] { guildId, userId, modifyGuildMember };

            return((Task)methodImpls["ModifyGuildMemberNickname"](Client, arguments));
        }
コード例 #3
0
ファイル: Session.cs プロジェクト: uponatime2019/Quarrel
        public static void ModifyGuildMember(string guildId, string userId, ModifyGuildMember modify)
        {
            IGuildService guildservice = AuthenticatedRestFactory.GetGuildService();

            guildservice.ModifyGuildMember(guildId, userId, modify);
        }
コード例 #4
0
        /// <inheritdoc />
        public virtual Task <GuildMember> ModifyCurrentUserNickname(string guildId, ModifyGuildMember member)
        {
            var arguments = new object[] { guildId, member };

            return((Task <GuildMember>)methodImpls["ModifyCurrentUserNickname"](Client, arguments));
        }