using System;
using System.Collections.Generic;
using System.IO;
using System.Threading.Tasks;
namespace Discord
{
///
/// Represents a generic Discord client.
///
public interface IDiscordClient : IDisposable, IAsyncDisposable
{
///
/// Gets the current state of connection.
///
ConnectionState ConnectionState { get; }
///
/// Gets the currently logged-in user.
///
ISelfUser CurrentUser { get; }
///
/// Gets the token type of the logged-in user.
///
TokenType TokenType { get; }
///
/// Starts the connection between Discord and the client..
///
///
/// This method will initialize the connection between the client and Discord.
///
/// This method will immediately return after it is called, as it will initialize the connection on
/// another thread.
///
///
///
/// A task that represents the asynchronous start operation.
///
Task StartAsync();
///
/// Stops the connection between Discord and the client.
///
///
/// A task that represents the asynchronous stop operation.
///
Task StopAsync();
///
/// Gets a Discord application information for the logged-in user.
///
///
/// This method reflects your application information you submitted when creating a Discord application via
/// the Developer Portal.
///
/// The options to be used when sending the request.
///
/// A task that represents the asynchronous get operation. The task result contains the application
/// information.
///
Task GetApplicationInfoAsync(RequestOptions options = null);
///
/// Gets a generic channel.
///
///
///
/// var channel = await _client.GetChannelAsync(381889909113225237);
/// if (channel != null && channel is IMessageChannel msgChannel)
/// {
/// await msgChannel.SendMessageAsync($"{msgChannel} is created at {msgChannel.CreatedAt}");
/// }
///
///
/// The snowflake identifier of the channel (e.g. `381889909113225237`).
/// The that determines whether the object should be fetched from cache.
/// The options to be used when sending the request.
///
/// A task that represents the asynchronous get operation. The task result contains the channel associated
/// with the snowflake identifier; when the channel cannot be found.
///
Task GetChannelAsync(ulong id, CacheMode mode = CacheMode.AllowDownload, RequestOptions options = null);
///
/// Gets a collection of private channels opened in this session.
///
/// The that determines whether the object should be fetched from cache.
/// The options to be used when sending the request.
///
/// This method will retrieve all private channels (including direct-message, group channel and such) that
/// are currently opened in this session.
///
/// This method will not return previously opened private channels outside of the current session! If
/// you have just started the client, this may return an empty collection.
///
///
///
/// A task that represents the asynchronous get operation. The task result contains a read-only collection
/// of private channels that the user currently partakes in.
///
Task> GetPrivateChannelsAsync(CacheMode mode = CacheMode.AllowDownload, RequestOptions options = null);
///
/// Gets a collection of direct message channels opened in this session.
///
///
/// This method returns a collection of currently opened direct message channels.
///
/// This method will not return previously opened DM channels outside of the current session! If you
/// have just started the client, this may return an empty collection.
///
///
/// The that determines whether the object should be fetched from cache.
/// The options to be used when sending the request.
///
/// A task that represents the asynchronous get operation. The task result contains a read-only collection
/// of direct-message channels that the user currently partakes in.
///
Task> GetDMChannelsAsync(CacheMode mode = CacheMode.AllowDownload, RequestOptions options = null);
///
/// Gets a collection of group channels opened in this session.
///
///
/// This method returns a collection of currently opened group channels.
///
/// This method will not return previously opened group channels outside of the current session! If you
/// have just started the client, this may return an empty collection.
///
///
/// The that determines whether the object should be fetched from cache.
/// The options to be used when sending the request.
///
/// A task that represents the asynchronous get operation. The task result contains a read-only collection
/// of group channels that the user currently partakes in.
///
Task> GetGroupChannelsAsync(CacheMode mode = CacheMode.AllowDownload, RequestOptions options = null);
///
/// Gets the connections that the user has set up.
///
/// The options to be used when sending the request.
///
/// A task that represents the asynchronous get operation. The task result contains a read-only collection of connections.
///
Task> GetConnectionsAsync(RequestOptions options = null);
///
/// Gets a global application command.
///
/// The id of the command.
/// The options to be used when sending the request.
///
/// A task that represents the asynchronous get operation. The task result contains the application command if found, otherwise
/// .
///
Task GetGlobalApplicationCommandAsync(ulong id, RequestOptions options = null);
///
/// Gets a collection of all global commands.
///
/// Whether to include full localization dictionaries in the returned objects, instead of the name localized and description localized fields.
/// The target locale of the localized name and description fields. Sets X-Discord-Locale header, which takes precedence over Accept-Language.
/// The options to be used when sending the request.
///
/// A task that represents the asynchronous get operation. The task result contains a read-only collection of global
/// application commands.
///
Task> GetGlobalApplicationCommandsAsync(bool withLocalizations = false, string locale = null, RequestOptions options = null);
///
/// Creates a global application command.
///
/// The properties to use when creating the command.
/// The options to be used when sending the request.
///
/// A task that represents the asynchronous creation operation. The task result contains the created application command.
///
Task CreateGlobalApplicationCommand(ApplicationCommandProperties properties, RequestOptions options = null);
///
/// Bulk overwrites all global application commands.
///
/// A collection of properties to use when creating the commands.
/// The options to be used when sending the request.
///
/// A task that represents the asynchronous creation operation. The task result contains a collection of application commands that were created.
///
Task> BulkOverwriteGlobalApplicationCommand(ApplicationCommandProperties[] properties, RequestOptions options = null);
///
/// Gets a guild.
///
/// The guild snowflake identifier.
/// The that determines whether the object should be fetched from cache.
/// The options to be used when sending the request.
///
/// A task that represents the asynchronous get operation. The task result contains the guild associated
/// with the snowflake identifier; when the guild cannot be found.
///
Task GetGuildAsync(ulong id, CacheMode mode = CacheMode.AllowDownload, RequestOptions options = null);
///
/// Gets a collection of guilds that the user is currently in.
///
/// The that determines whether the object should be fetched from cache.
/// The options to be used when sending the request.
///
/// A task that represents the asynchronous get operation. The task result contains a read-only collection
/// of guilds that the current user is in.
///
Task> GetGuildsAsync(CacheMode mode = CacheMode.AllowDownload, RequestOptions options = null);
///
/// Creates a guild for the logged-in user who is in less than 10 active guilds.
///
///
/// This method creates a new guild on behalf of the logged-in user.
///
/// Due to Discord's limitation, this method will only work for users that are in less than 10 guilds.
///
///
/// The name of the new guild.
/// The voice region to create the guild with.
/// The icon of the guild.
/// The options to be used when sending the request.
///
/// A task that represents the asynchronous creation operation. The task result contains the created guild.
///
Task CreateGuildAsync(string name, IVoiceRegion region, Stream jpegIcon = null, RequestOptions options = null);
///
/// Gets an invite.
///
/// The invitation identifier.
/// The options to be used when sending the request.
///
/// A task that represents the asynchronous get operation. The task result contains the invite information.
///
Task GetInviteAsync(string inviteId, RequestOptions options = null);
///
/// Gets a user.
///
///
///
/// var user = await _client.GetUserAsync(168693960628371456);
/// if (user != null)
/// Console.WriteLine($"{user} is created at {user.CreatedAt}.";
///
///
/// The snowflake identifier of the user (e.g. `168693960628371456`).
/// The that determines whether the object should be fetched from cache.
/// The options to be used when sending the request.
///
/// A task that represents the asynchronous get operation. The task result contains the user associated with
/// the snowflake identifier; if the user is not found.
///
Task GetUserAsync(ulong id, CacheMode mode = CacheMode.AllowDownload, RequestOptions options = null);
///
/// Gets a user.
///
///
///
/// var user = await _client.GetUserAsync("Still", "2876");
/// if (user != null)
/// Console.WriteLine($"{user} is created at {user.CreatedAt}.";
///
///
/// The name of the user (e.g. `Still`).
/// The discriminator value of the user (e.g. `2876`).
/// The options to be used when sending the request.
///
/// A task that represents the asynchronous get operation. The task result contains the user associated with
/// the name and the discriminator; if the user is not found.
///
Task GetUserAsync(string username, string discriminator, RequestOptions options = null);
///
/// Gets a collection of the available voice regions.
///
///
/// The following example gets the most optimal voice region from the collection.
///
/// var regions = await client.GetVoiceRegionsAsync();
/// var optimalRegion = regions.FirstOrDefault(x => x.IsOptimal);
///
///
/// The options to be used when sending the request.
///
/// A task that represents the asynchronous get operation. The task result contains a read-only collection
/// with all of the available voice regions in this session.
///
Task> GetVoiceRegionsAsync(RequestOptions options = null);
///
/// Gets a voice region.
///
/// The identifier of the voice region (e.g. eu-central ).
/// The options to be used when sending the request.
///
/// A task that represents the asynchronous get operation. The task result contains the voice region
/// associated with the identifier; if the voice region is not found.
///
Task GetVoiceRegionAsync(string id, RequestOptions options = null);
///
/// Gets a webhook available.
///
/// The identifier of the webhook.
/// The options to be used when sending the request.
///
/// A task that represents the asynchronous get operation. The task result contains a webhook associated
/// with the identifier; if the webhook is not found.
///
Task GetWebhookAsync(ulong id, RequestOptions options = null);
///
/// Gets the recommended shard count as suggested by Discord.
///
/// The options to be used when sending the request.
///
/// A task that represents the asynchronous get operation. The task result contains an
/// that represents the number of shards that should be used with this account.
///
Task GetRecommendedShardCountAsync(RequestOptions options = null);
///
/// Gets the gateway information related to the bot.
///
/// The options to be used when sending the request.
///
/// A task that represents the asynchronous get operation. The task result contains a
/// that represents the gateway information related to the bot.
///
Task GetBotGatewayAsync(RequestOptions options = null);
///
/// Creates a test entitlement to a given SKU for a given guild or user.
///
Task CreateTestEntitlementAsync(ulong skuId, ulong ownerId, SubscriptionOwnerType ownerType, RequestOptions options = null);
///
/// Deletes a currently-active test entitlement.
///
Task DeleteTestEntitlementAsync(ulong entitlementId, RequestOptions options = null);
///
/// Returns all entitlements for a given app, active and expired.
///
IAsyncEnumerable> GetEntitlementsAsync(int limit = 100,
ulong? afterId = null, ulong? beforeId = null, bool excludeEnded = false, ulong? guildId = null, ulong? userId = null,
ulong[] skuIds = null, RequestOptions options = null);
///
/// Returns all SKUs for a given application.
///
Task> GetSKUsAsync(RequestOptions options = null);
///
/// Marks a given one-time purchase entitlement for the user as consumed.
///
/// The id of the entitlement.
/// The options to be used when sending the request.
Task ConsumeEntitlementAsync(ulong entitlementId, RequestOptions options = null);
///
/// Returns all subscriptions for a given SKU.
///
IAsyncEnumerable> GetSKUSubscriptionsAsync(ulong skuId, int limit = 100, ulong? afterId = null,
ulong? beforeId = null, ulong? userId = null, RequestOptions options = null);
///
/// Gets a subscription by its id.
///
Task GetSKUSubscriptionAsync(ulong skuId, ulong subscriptionId, RequestOptions options = null);
///
/// Gets an emote for the current application.
///
public Task GetApplicationEmoteAsync(ulong emoteId, RequestOptions options = null);
///
/// Gets all emotes for the current application.
///
public Task> GetApplicationEmotesAsync(RequestOptions options = null);
///
/// Modifies an emote for the current application.
///
public Task ModifyApplicationEmoteAsync(ulong emoteId, Action args, RequestOptions options = null);
///
/// Creates an emote for the current application.
///
public Task CreateApplicationEmoteAsync(string name, Image image, RequestOptions options = null);
///
/// Deletes an emote for the current application.
///
public Task DeleteApplicationEmoteAsync(ulong emoteId, RequestOptions options = null);
}
}