コード例 #1
0
ファイル: SpaceX.cs プロジェクト: martindevans/Mute
        public async Task CoreDetails(string id)
        {
            var details = await _spacex.Core(id)
                          ?? await _spacex.Core($"B{id}");

            if (details == null)
            {
                await TypingReplyAsync("There doesn't seem to be a core by that ID");

                return;
            }

            var embed = await details.DiscordEmbed();

            var msg = await ReplyAsync(embed);

            if (details.Launches is { Count : > 1 })
コード例 #2
0
ファイル: SpaceX.cs プロジェクト: Chronojam/Mute
        public async Task CoreDetails(string id)
        {
            var details = await _spacex.Core(id);

            if (details == null)
            {
                await TypingReplyAsync("There doesn't seem to be a core by that ID");

                return;
            }

            await ReplyAsync(await details.DiscordEmbed());
        }