コード例 #1
0
 public static async Task <IChannel> GetChannelAsync(ulong channelId, [CanBeNull] Client client, params ChannelType[] types)
 {
     client = client ?? DiscordEnvironment.CurrentClient;
     FactoryUtils.ValidateInEnv(client);
     return(await FactoryUtils.GetChannelAsync(_globalCache, "IChannel", null, json => {
         return CreateFromJson(json, null);
     }, (x, json, state) => {
         FactoryUtils.PopulateInstance(x, json, state);
     }, channelId, client, types));
 }