Made the requested changes
This commit is contained in:
@@ -793,7 +793,7 @@ namespace Discord.WebSocket
|
||||
if (guild != null)
|
||||
{
|
||||
guild.AddChannel(data, DataStore);
|
||||
channel = DataStore.GetChannel(data.Id);
|
||||
channel = guild.AddChannel(data, DataStore);
|
||||
|
||||
if (!guild.IsSynced)
|
||||
{
|
||||
|
||||
@@ -148,11 +148,12 @@ namespace Discord.WebSocket
|
||||
|
||||
public override Task<IGuildChannel> GetChannelAsync(ulong id) => Task.FromResult<IGuildChannel>(GetChannel(id));
|
||||
public override Task<IReadOnlyCollection<IGuildChannel>> GetChannelsAsync() => Task.FromResult<IReadOnlyCollection<IGuildChannel>>(Channels);
|
||||
public void AddChannel(ChannelModel model, DataStore dataStore, ConcurrentHashSet<ulong> channels = null)
|
||||
public ISocketGuildChannel AddChannel(ChannelModel model, DataStore dataStore, ConcurrentHashSet<ulong> channels = null)
|
||||
{
|
||||
var channel = ToChannel(model);
|
||||
(channels ?? _channels).TryAdd(model.Id);
|
||||
dataStore.AddChannel(channel);
|
||||
return channel;
|
||||
}
|
||||
public ISocketGuildChannel GetChannel(ulong id)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user