コード例 #1
0
ファイル: HelpService.cs プロジェクト: MickMelon/FalloutRPG
 public async Task ShowNpcPresetHelpAsync(SocketCommandContext context)
 {
     var userInfo = context.User;
     var embed    = EmbedHelper.BuildBasicEmbedWithFields("Command: $help npc preset", string.Empty,
                                                          Pages.HELP_NPC_PRESETS_PAGE1_TITLES, Pages.HELP_NPC_PRESETS_PAGE1_CONTENTS);
     await context.User.SendMessageAsync(userInfo.Mention, embed : embed);
 }
コード例 #2
0
ファイル: RoleplayModule.cs プロジェクト: mrredcon/FalloutRPG
        public async Task ShowHighScoresAsync()
        {
            var userInfo = Context.User;
            var charList = await _charService.GetHighScoresAsync();

            var strBuilder = new StringBuilder();

            /*for (var i = 0; i < charList.Count; i++)
             * {
             *  var level = _expService.CalculateLevelForExperience(charList[i].Experience);
             *
             *  strBuilder.Append(
             *      $"**{i + 1}:** {charList[i].FirstName} {charList[i].LastName}" +
             *      $" | Level: {level}" +
             *      $" | Experience: {charList[i].Experience}\n");
             * }
             *
             * var embed = EmbedHelper.BuildBasicEmbed("Command: $highscores", strBuilder.ToString());*/

            var fieldTitlesList   = new List <string>();
            var fieldContentsList = new List <string>();

            for (var i = 0; i < charList.Count; i++)
            {
                var level = _expService.CalculateLevelForExperience(charList[i].Experience);
                fieldTitlesList.Add($"{i + 1}: {charList[i].Name}");
                fieldContentsList.Add($"Level {level} / {charList[i].Experience} XP");
            }

            var embed = EmbedHelper.BuildBasicEmbedWithFields("Command: $hiscores", string.Empty, fieldTitlesList.ToArray(), fieldContentsList.ToArray());

            await ReplyAsync(userInfo.Mention, embed : embed);
        }
コード例 #3
0
ファイル: HelpService.cs プロジェクト: MickMelon/FalloutRPG
        /// <summary>
        /// Shows the general help menu.
        /// </summary>
        public async Task ShowGeneralHelpAsync(SocketCommandContext context)
        {
            var userInfo = context.User;
            var embed    = EmbedHelper.BuildBasicEmbedWithFields("Command: $help general", string.Empty,
                                                                 Pages.HELP_GENERAL_PAGE1_TITLES, Pages.HELP_GENERAL_PAGE1_CONTENTS);

            await context.User.SendMessageAsync(userInfo.Mention, embed : embed);
        }
コード例 #4
0
ファイル: HelpService.cs プロジェクト: MickMelon/FalloutRPG
        /// <summary>
        /// Shows the Admin help menu.
        /// </summary>
        public async Task ShowAdminHelpAsync(SocketCommandContext context)
        {
            var userInfo = context.User;
            var message  = new StringBuilder();

            var embed = EmbedHelper.BuildBasicEmbedWithFields("Command: $help admin", string.Empty,
                                                              Pages.HELP_ADMIN_PAGE1_TITLES, Pages.HELP_ADMIN_PAGE1_CONTENTS);

            await context.User.SendMessageAsync(userInfo.Mention, embed : embed);
        }
コード例 #5
0
ファイル: TutorialModule.cs プロジェクト: mrredcon/FalloutRPG
        public async Task ShowTutorialAsync()
        {
            var userInfo = Context.User;
            var message  = new StringBuilder();

            var embed = EmbedHelper.BuildBasicEmbedWithFields("Command: $tutorial",
                                                              "More functionality will be added in future iterations.", Pages.TUTORIAL_TITLES, Pages.TUTORIAL_CONTENTS);

            await Context.User.SendMessageAsync(userInfo.Mention, embed : embed);

            await Context.User.SendMessageAsync("Note: Use $help if you get stuck.");
        }