Пример #1
0
        public async Task BeginEncounter(CommandContext c)
        {
            await c.TriggerTypingAsync();

            string encounterId;
            var    canSpawn = EncounterManager.TrySpawnEncounterForUser(c.Member, out encounterId);

            if (!canSpawn)
            {
                if (encounterId != null)
                {
                    await c.RespondAsync(embed : DiscordEmbedUtils.MakeEmbed(text: $"You're already in the encounter **{EncounterManager.GetEncounter( encounterId ).title}**! Get back there!", author: c.Member));
                }
                else
                {
                    await c.RespondAsync(embed : DiscordEmbedUtils.MakeEmbed(text: $"You searched but nothing interesting seems to be happening at the moment...", author: c.Member));
                }
            }
            else
            {
                if (encounterId != null)
                {
                    await EncounterManager.SpawnEncounter(c.Channel, c.User, encounterId);
                }
                else
                {
                    await c.RespondAsync(embed : DiscordEmbedUtils.MakeEmbed(text: $"You searched but nothing interesting seems to be happening at the moment...", author: c.Member));
                }
            }
        }
Пример #2
0
        public async Task BeginEncounter(CommandContext c)
        {
            await c.TriggerTypingAsync();

            var encounter = EncounterManager.TrySpawnEncounterForUser(c.Member);

            if (encounter != null)
            {
                await EncounterManager.SpawnEncounter(c.Channel, c.User, encounter);
            }
            else
            {
                await c.RespondAsync(embed : DiscordEmbedUtils.MakeEmbed(text: $"**{c.Member.DisplayName}** searched but nothing interesting seems to be happening at the moment..."));
            }
        }