Beispiel #1
0
        public static async Task <DiscordUser> MapUserAsync(DiscordSocketClient discord, BotState state, DBDiscordUser dBUser)
        {
            var guild = discord.GetGuild(dBUser.GuildIDSnowflake);

            if (guild == null)
            {
                return(null);
            }

            var socketUser = await guild.GetUserFromGuildAsync(dBUser.UserIDSnowflake);

            return(await DiscordUser.CreateAsync(guild, socketUser, dBUser, discord, state.AppInfo));
        }