Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Discord.net not work on device but work on emulator. XAMARIN FORM #2811

Open
3 tasks done
bubu76 opened this issue Dec 19, 2023 · 1 comment
Open
3 tasks done
Labels

Comments

@bubu76
Copy link

bubu76 commented Dec 19, 2023

Check The Docs

  • I double checked the docs and couldn't find any useful information.

Verify Issue Source

  • I verified the issue was caused by Discord.Net.

Check your intents

  • I double checked that I have the required intents.

Description

xamarin forms application

discord.net works correctly when the app is running in the visual studio android emulator, but remains in the connecting state when running on the physical device

Version

3.13.0

Working Version

No response

Logs

[0:] Discord.Net v3.13.0 (API v10)
[0:] Connecting

Sample

private static async Task DiscordClient(string Message, string Track, ulong ChannelID)
{
try
{

    var config = new DiscordSocketConfig() { GatewayIntents = GatewayIntents.All | GatewayIntents.MessageContent };
    DiscordSocketClient client = new DiscordSocketClient(config);

    client.Log += (LogMessage arg) =>
    {
        Debug.WriteLine(arg.Message);
        return null;
    };

    await client.LoginAsync(TokenType.Bot, _token);
    
    await client.StartAsync();
    
    var embed = new EmbedBuilder().WithImageUrl($"https://fpritalia-001-site1.ctempurl.com/Eventi/Poster/{Track}_poster_thumb.jpg").Build();
    
    client.Ready += async ()  =>
    {
        var channel = await client.GetChannelAsync(ChannelID) as IMessageChannel;
        await channel.SendMessageAsync(Message, isTTS: false, embed: embed);
    };
}
catch (Exception)
{
    throw;
}

}

Packages

null

Environment

OS: Android
SDK: .net standard 2.0

@bubu76 bubu76 added the bug label Dec 19, 2023
@bubu76 bubu76 changed the title [Bug]: [Bug]: Discord.net not work on device but work on emulator. XAMARIN FORM Dec 19, 2023
@Misha-133
Copy link
Member

Hey, sorry for late response
Can you still reproduce the issue on 3.13.1?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants