Exemplo n.º 1
0
        public async Task RegisterByReactions()
        {
            EmbedBuilder builder = EmbedBuilderService.InitBuilder(new List <EmbedFieldBuilder>(),
                                                                   _topten.ColorTopTen,
                                                                   "Réagissez avec l'emote 💯 pour vous inscrire !");

            var msg = await Context.Channel.SendMessageAsync("", false, builder.Build());

            await msg.AddReactionAsync(_topten.RegisterEmoteChar);

            _topten.StoreRegisterMsg(msg.Id);
        }
Exemplo n.º 2
0
        public async Task ReadRegister()
        {
            await UpdatePlayers();

            if (_topten.Users.Count == 0)
            {
                await ReplyAsync("Personne ne joue !");

                return;
            }

            EmbedBuilder builder = EmbedBuilderService.GenerateBuilderReadRegister(_topten.Users, _topten.ColorTopTen);

            await ReplyAsync("", false, builder.Build());
        }
Exemplo n.º 3
0
        public async Task GenerateNumbers()
        {
            await UpdatePlayers();

            if (_topten.IndexCapten == null)
            {
                await ReplyAsync("Personne ne joue !");

                return;
            }

            if (_topten.Themes.Count == 0)
            {
                using (var dbContext = new SqlLiteContext())
                {
                    _topten.Themes = TopTenService.GetRandomThemes(dbContext);
                }
            }

            var          theme   = _topten.GetNextTheme();
            EmbedBuilder builder = EmbedBuilderService.GenerateBuilderForNumberDisplay(_topten, theme);

            await ReplyAsync("", false, builder.Build());
        }
Exemplo n.º 4
0
 public AdminModule(EmbedBuilderService _embedBuilderService)
 {
     embedBuilderService = _embedBuilderService;
 }
Exemplo n.º 5
0
 public ModerationModule(EmbedBuilderService _embedBuilderService, ModerationService _moderationService, MessageBuilderService _messagebuilderService)
 {
     embedBuilderService   = _embedBuilderService;
     moderationService     = _moderationService;
     messagebuilderService = _messagebuilderService;
 }