Esempio n. 1
0
 public static async Task AcceptInvite(string code)
 {
     try
     {
         IInviteService inviteservice = AuthenticatedRestFactory.GetInviteService();
         await inviteservice.AcceptInvite(code);
     }
     catch
     {
     }
 }
Esempio n. 2
0
 public static async Task DeleteInvite(string channelId)
 {
     try
     {
         IInviteService channelservice = AuthenticatedRestFactory.GetInviteService();
         var            ch             = await channelservice.DeleteInvite(channelId);
     }
     catch (Exception exception)
     {
         App.NavigateToBugReport(exception);
     }
 }
Esempio n. 3
0
        private Task <bool> Login()
        {
            Messenger.Default.Send(new ConnectionStatusMessage(ConnectionStatus.Connecting));

            IAuthenticator           authenticator            = new DiscordAuthenticator(_accessToken);
            AuthenticatedRestFactory authenticatedRestFactory = new AuthenticatedRestFactory(new DiscordApiConfiguration()
            {
                BaseUrl = "https://discordapp.com/api"
            }, authenticator);

            ActivitesService   = authenticatedRestFactory.GetActivitesService();
            ChannelService     = authenticatedRestFactory.GetChannelService();
            ConnectionsService = authenticatedRestFactory.GetConnectionService();
            GameService        = authenticatedRestFactory.GetGameService();
            GuildService       = authenticatedRestFactory.GetGuildService();
            InviteService      = authenticatedRestFactory.GetInviteService();
            MiscService        = authenticatedRestFactory.GetMiscService();
            UserService        = authenticatedRestFactory.GetUserService();
            VoiceService       = authenticatedRestFactory.GetVoiceService();

            return(_gatewayService.InitializeGateway(_accessToken));
        }
Esempio n. 4
0
        public static async Task <Invite> GetInvite(string code)
        {
            IInviteService inviteservice = AuthenticatedRestFactory.GetInviteService();

            return(await inviteservice.GetInvite(code));
        }