Browse Source

Exposed Client property on modules and AudioService

tags/docs-0.9
RogueException 10 years ago
parent
commit
61d426d427
8 changed files with 10 additions and 10 deletions
  1. +1
    -1
      src/Discord.Net.Audio/AudioService.cs
  2. +1
    -1
      src/Discord.Net/Models/Channel.cs
  3. +1
    -1
      src/Discord.Net/Models/Invite.cs
  4. +1
    -1
      src/Discord.Net/Models/Message.cs
  5. +1
    -1
      src/Discord.Net/Models/Profile.cs
  6. +1
    -1
      src/Discord.Net/Models/Role.cs
  7. +2
    -2
      src/Discord.Net/Models/Server.cs
  8. +2
    -2
      src/Discord.Net/Models/User.cs

+ 1
- 1
src/Discord.Net.Audio/AudioService.cs View File

@@ -15,7 +15,7 @@ namespace Discord.Audio
private ConcurrentDictionary<User, bool> _talkingUsers; private ConcurrentDictionary<User, bool> _talkingUsers;
private int _nextClientId; private int _nextClientId;


internal DiscordClient Client { get; private set; }
public DiscordClient Client { get; private set; }
public AudioServiceConfig Config { get; } public AudioServiceConfig Config { get; }


public event EventHandler Connected = delegate { }; public event EventHandler Connected = delegate { };


+ 1
- 1
src/Discord.Net/Models/Channel.cs View File

@@ -46,7 +46,7 @@ namespace Discord
private readonly ConcurrentDictionary<ulong, Message> _messages; private readonly ConcurrentDictionary<ulong, Message> _messages;
private Dictionary<ulong, PermissionOverwrite> _permissionOverwrites; private Dictionary<ulong, PermissionOverwrite> _permissionOverwrites;
internal DiscordClient Client { get; }
public DiscordClient Client { get; }


/// <summary> Gets the unique identifier for this channel. </summary> /// <summary> Gets the unique identifier for this channel. </summary>
public ulong Id { get; } public ulong Id { get; }


+ 1
- 1
src/Discord.Net/Models/Invite.cs View File

@@ -61,7 +61,7 @@ namespace Discord
} }
} }


internal DiscordClient Client { get; }
public DiscordClient Client { get; }


/// <summary> Gets the unique code for this invite. </summary> /// <summary> Gets the unique code for this invite. </summary>
public string Code { get; } public string Code { get; }


+ 1
- 1
src/Discord.Net/Models/Message.cs View File

@@ -169,7 +169,7 @@ namespace Discord
internal File() { } internal File() { }
} }


internal DiscordClient Client => Channel.Client;
public DiscordClient Client => Channel.Client;


/// <summary> Returns the unique identifier for this message. </summary> /// <summary> Returns the unique identifier for this message. </summary>
public ulong Id { get; internal set; } public ulong Id { get; internal set; }


+ 1
- 1
src/Discord.Net/Models/Profile.cs View File

@@ -10,7 +10,7 @@ namespace Discord
{ {
private readonly static Action<Profile, Profile> _cloner = DynamicIL.CreateCopyMethod<Profile>(); private readonly static Action<Profile, Profile> _cloner = DynamicIL.CreateCopyMethod<Profile>();


internal DiscordClient Client { get; }
public DiscordClient Client { get; }


/// <summary> Gets the unique identifier for this user. </summary> /// <summary> Gets the unique identifier for this user. </summary>
public ulong Id { get; } public ulong Id { get; }


+ 1
- 1
src/Discord.Net/Models/Role.cs View File

@@ -13,7 +13,7 @@ namespace Discord
{ {
private readonly static Action<Role, Role> _cloner = DynamicIL.CreateCopyMethod<Role>(); private readonly static Action<Role, Role> _cloner = DynamicIL.CreateCopyMethod<Role>();


internal DiscordClient Client => Server.Client;
public DiscordClient Client => Server.Client;


/// <summary> Gets the unique identifier for this role. </summary> /// <summary> Gets the unique identifier for this role. </summary>
public ulong Id { get; } public ulong Id { get; }


+ 2
- 2
src/Discord.Net/Models/Server.cs View File

@@ -52,8 +52,8 @@ namespace Discord
private readonly ConcurrentDictionary<ulong, Channel> _channels; private readonly ConcurrentDictionary<ulong, Channel> _channels;
private ulong _ownerId; private ulong _ownerId;
private ulong? _afkChannelId; private ulong? _afkChannelId;
internal DiscordClient Client { get; }
public DiscordClient Client { get; }


/// <summary> Gets the unique identifier for this server. </summary> /// <summary> Gets the unique identifier for this server. </summary>
public ulong Id { get; } public ulong Id { get; }


+ 2
- 2
src/Discord.Net/Models/User.cs View File

@@ -46,8 +46,8 @@ namespace Discord
private DateTime? _lastOnline; private DateTime? _lastOnline;
private ulong? _voiceChannelId; private ulong? _voiceChannelId;
private Dictionary<ulong, Role> _roles; private Dictionary<ulong, Role> _roles;
internal DiscordClient Client { get; }
public DiscordClient Client { get; }


/// <summary> Gets the unique identifier for this user. </summary> /// <summary> Gets the unique identifier for this user. </summary>
public ulong Id { get; } public ulong Id { get; }


Loading…
Cancel
Save