public async Task DisplayExp(CommandContext c, DiscordUser user = null)
        {
            await c.TriggerTypingAsync();

            if (user == null)
            {
                user = c.Member;
            }

            var exp = await ExperienceManager.GetExpAsync(user);

            await c.RespondAsync(string.Format("**{0}** has {1} experience.", user.Username, exp));
        }
Esempio n. 2
0
        internal void Execute(DiscordChannel channel, DiscordUser user)
        {
            if (encounterId != null)
            {
                EncounterManager.SpawnEncounter(channel, user, encounterId);
                return;
            }

            if (loot != null)
            {
                ExperienceManager.GiveExpAndNotifyAsync(channel, user, loot.experience);
            }
        }
Esempio n. 3
0
        internal void Execute(DiscordChannel channel, DiscordUser user)
        {
            if (encounter != null)
            {
                EncounterManager.SpawnEncounter(channel, user, encounter);
                return;
            }

            var resTitle = title;
            var resText  = text;

            if (loot != null)
            {
                ExperienceManager.GiveExpAsync(channel, user, loot.experience);

                if (resTitle == null)
                {
                    resTitle = "Loot Get!";
                }
                resText = string.Format("{0}\n{1}", resText, $"You gained {loot.experience} experience from this encounter.");
            }

            channel.SendMessageAsync(embed: DiscordEmbedUtils.MakeEmbed(showTitle ? resTitle : null, resText, author: user));
        }