-
-
Notifications
You must be signed in to change notification settings - Fork 741
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
Expose VoiceServerUpdate events #984
Changes from 6 commits
7cce63a
29db63d
66e5af9
26bd283
669ba37
8e454fe
a405913
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
using System.Diagnostics; | ||
|
||
namespace Discord.WebSocket | ||
{ | ||
[DebuggerDisplay(@"{DebuggerDisplay,nq}")] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You need to implement a function named |
||
public class SocketVoiceServer | ||
{ | ||
public Cacheable<IGuild, ulong> Guild { get; private set; } | ||
public string Endpoint { get; private set; } | ||
public string Token { get; private set; } | ||
|
||
internal SocketVoiceServer(Cacheable<IGuild, ulong> guild, ulong guildId, string endpoint, string token) | ||
{ | ||
Guild = guild; | ||
Endpoint = endpoint; | ||
Token = token; | ||
} | ||
|
||
private string DebuggerDisplay => $"SocketVoiceServer ({Guild.Id})"; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This will null ref if the guild isn't cached (literally should never happen, but worth pointing out. Opt for using the ID directly from the cacheable. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I thought .Id did return the ID (ulong)? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, my bad, misread. |
||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was the cast necessary? Not sure if the compiler would actually complain about that or not, but my first instinct just from reading is that it shouldn't.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It did https://i.serux.pro/6c425faf71.png