コード例 #1
0
        public async Task Steve(CommandContext ctx)
        {
            var userProfileTemporary = await GetUserProfileTemporaryAsync(ctx);

            var handler            = new ActionHandler();
            var turnContextWrapper = new TurnContextWrapper(ctx);
            await handler.ParseSlashCommands(turnContextWrapper, userProfileTemporary, new CancellationToken(), null);
        }
コード例 #2
0
        public async Task GetRandotrips(CommandContext ctx, [Description("yyyy-mm-dd")] params string[] date)
        {
            var userProfileTemporary = await GetUserProfileTemporaryAsync(ctx);

            var handler            = new ActionHandler();
            var turnContextWrapper = new TurnContextWrapper(ctx);
            await handler.ParseSlashCommands(turnContextWrapper, userProfileTemporary, new CancellationToken(), null);
        }
コード例 #3
0
        public async Task GetAnomaly(CommandContext ctx, [Description("Number of points to generate")] params int[] numberPoints)
        {
            var userProfileTemporary = await GetUserProfileTemporaryAsync(ctx);

            var handler            = new ActionHandler();
            var turnContextWrapper = new TurnContextWrapper(ctx, numberPoints.Length == 1 ? numberPoints[0] : 1);
            await handler.ParseSlashCommands(turnContextWrapper, userProfileTemporary, new CancellationToken(), null);
        }
コード例 #4
0
        public async Task SetLocation(CommandContext ctx, [Description("Address/place name or a Google Maps URL")] params string[] location)
        {
            var userProfileTemporary = await GetUserProfileTemporaryAsync(ctx);

            var handler            = new ActionHandler();
            var turnContextWrapper = new TurnContextWrapper(ctx);
            await handler.ParseSlashCommands(turnContextWrapper, userProfileTemporary, new CancellationToken(), null);

            await SaveUserProfileTemporaryAsync(ctx, userProfileTemporary);
        }
コード例 #5
0
        public async Task SetRadius(CommandContext ctx, [Description("Radius in meters")] params string[] radius)
        {
            var userProfileTemporary = await GetUserProfileTemporaryAsync(ctx);

            var handler            = new ActionHandler();
            var turnContextWrapper = new TurnContextWrapper(ctx);
            await handler.ParseSlashCommands(turnContextWrapper, userProfileTemporary, new CancellationToken(), null);

            await SaveUserProfileTemporaryAsync(ctx, userProfileTemporary);
        }