예제 #1
0
 public static async Task <ServerEmoji> GetAsync(ulong emojiId, ulong serverId, [CanBeNull] Client client)
 {
     return(await FactoryUtils.GetAsync <ServerEmoji, EmojiJson, NoSuchEmojiException>(_cache, "Emoji", null, FactoryUtils.ResolveGetter <EmojiJson>(client, c => async id2 => await c.GetServerEmojiJsonAsync(id2, serverId)), json => new ServerEmoji(serverId, json, emojiId), Populate, emojiId));
 }
예제 #2
0
파일: User.cs 프로젝트: hujgup/DiscordApi
 public static async Task <User> GetAsync(ulong userId, [CanBeNull] Client client)
 {
     return(await FactoryUtils.GetAsync <User, UserJson, NoSuchUserException>(_cache, "ServerUser", null, FactoryUtils.ResolveGetter <UserJson>(client, c2 => c2.GetUserJsonAsync), json => new User(json), Populate, userId));
 }