using System.Collections.Generic; using System.Threading.Tasks; namespace Discord { public interface IPublicChannel : IChannel { /// Gets the server this channel is a member of. Server Server { get; } /// Gets a collection of permission overwrites for this channel. IEnumerable PermissionOverwrites { get; } /// Gets the position of this public channel relative to others of the same type. int Position { get; } /// Gets a user in this channel with the given id. new Task GetUser(ulong id); /// Gets a collection of all users in this channel. new Task> GetUsers(); /// Gets the permission overwrite for a specific user, or null if one does not exist. OverwritePermissions? GetPermissionOverwrite(ServerUser user); /// Gets the permission overwrite for a specific role, or null if one does not exist. OverwritePermissions? GetPermissionOverwrite(Role role); /// Downloads a collection of all invites to this server. Task> GetInvites(); /// Adds or updates the permission overwrite for the given user. Task UpdatePermissionOverwrite(ServerUser user, OverwritePermissions permissions); /// Adds or updates the permission overwrite for the given role. Task UpdatePermissionOverwrite(Role role, OverwritePermissions permissions); /// Removes the permission overwrite for the given user, if one exists. Task RemovePermissionOverwrite(ServerUser user); /// Removes the permission overwrite for the given role, if one exists. Task RemovePermissionOverwrite(Role role); /// Creates a new invite to this channel. /// Time (in seconds) until the invite expires. Set to null to never expire. /// The max amount of times this invite may be used. Set to null to have unlimited uses. /// If true, a user accepting this invite will be kicked from the server after closing their client. /// If true, creates a human-readable link. Not supported if maxAge is set to null. Task CreateInvite(int? maxAge = 1800, int? maxUses = null, bool tempMembership = false, bool withXkcd = false); } }