Ejemplo n.º 1
0
        /// <summary> Edits this user. </summary>
        /// <param name="nick">The nick of this user.</param>
        /// <param name="roles">The roles of this user.</param>
        /// <param name="mute">Whether this user should be muted.</param>
        /// <param name="deaf">Whether this user should be deaf.</param>
        /// <param name="channel">The channel of this user.</param>
        public void Edit(string nick, DiscordRole[] roles, bool?mute, bool?deaf, DiscordChannel channel, DiscordUserCallback callback)
        {
            EditMemberArgs args = new EditMemberArgs()
            {
                nick = nick, roles = Utils.GetRoleIDs(roles), channel_id = channel.ID
            };

            if (mute != null)
            {
                args.mute = mute.Value;
            }
            if (deaf != null)
            {
                args.deaf = deaf.Value;
            }
            client.EditMember(serverID, ID, args, callback);
        }
Ejemplo n.º 2
0
 /// <summary> Kicks the member from the server. </summary>
 public void KickMember(DiscordUser member, DiscordUserCallback callback)
 {
     client.KickMember(ID, member.ID, callback);
 }