private Embedable NewBoss(DateTime?lastTime, TimeSpan untilNext, TitanLordSettings settings)
        {
            GuildSettings.Edit <TitanLordSettings>(s => s.CQ++);

            var bossHp    = Calculator.TitanLordHp(settings.CQ);
            var clanBonus = Calculator.ClanBonus(settings.CQ);
            var advStart  = Calculator.AdvanceStart(settings.CQ);

            var builder = new LocalisedEmbedBuilder
            {
                Color     = System.Drawing.Color.DarkOrange.ToDiscord(),
                Timestamp = DateTime.Now,
            }.WithTitle(TitanLordText.NEWBOSS_EMBED_TITLE)
            .WithRawThumbnailUrl("https://cdn.discordapp.com/attachments/275257967937454080/308047011289235456/emoji.png")
            .AddField(f => f.WithName(TitanLordText.NEWBOSS_EMBED_CQ).WithValue(settings.CQ))
            .AddField(f => f.WithName(TitanLordText.NEWBOSS_EMBED_ADVANCEDSTART).WithValue(BonusType.ClanDamage.ToLocalisable(advStart)))
            .AddField(f => f.WithName(TitanLordText.NEWBOSS_EMBED_BONUS).WithValue(BonusType.ClanDamage.ToLocalisable(clanBonus)))
            .AddField(f => f.WithName(TitanLordText.NEWBOSS_EMBED_HP).WithValue(bossHp))
            .AddField(f => f.WithName(TitanLordText.NEWBOSS_EMBED_TTK).WithValue(DateTime.Now.Add(untilNext).Add(-BossDelay) - lastTime));

            return(builder);
        }
示例#2
0
        async Task IgnoreUser(IUser user, bool ignore = true)
        {
            GuildSettings.Edit <RegistrationSettings>(s =>
            {
                if (ignore)
                {
                    s.IgnoreList.Add(user.Id);
                }
                else
                {
                    s.IgnoreList.Remove(user.Id);
                }
            });

            if (ignore)
            {
                await ReplyAsync(ApplyText.IGNORE_IGNORED, ReplyType.Success);
            }
            else
            {
                await ReplyAsync(ApplyText.IGNORE_UNIGNORED, ReplyType.Success);
            }
        }
示例#3
0
 async Task SetPrefixAsync(string newPrefix)
 {
     GuildSettings.Edit <GeneralGuildSetting>(s => s.Prefix = newPrefix.ToLower());
     await ReplyAsync(PrefixText.SET_MESSAGE, ReplyType.Success, newPrefix.ToLower());
 }