govtechsg / butler-bot Goto Github PK
View Code? Open in Web Editor NEWTelegram bot for booking meeting rooms
License: MIT License
Telegram bot for booking meeting rooms
License: MIT License
Bot stopped responding to /booked after I made multiple booking.
Is it because max message length has reached?
How about splitting the text and send across multiple messages?
This is PEM error
listBookedEventsByRoom Error: Error: failed to obtain an authentication token, request failed with HTTP code 400: invalid_grant
listEmptySlotsInDay Error: Error: failed to obtain an authentication token, request failed with HTTP code 400: invalid_grant
Json Key error
listBookedEventsByRoom Error: Error: failed to sign JWT, the key is probably invalid
listEmptySlotsInDay Error: Error: failed to sign JWT, the key is probably invalid
Code here:
Settings.js
//require
the Google API Json Key
const KEYFILE = '../data/xxxxxx-xxxxxxxxx.pem';
const SERVICE_ACCT_ID = [email protected]';
const CALENDAR_URL = 'https://calendar.google.com/calendar/embed?src=xxxxxxxxgmail.com&ctz=Asia%2FHong_Kong';
const CALENDAR_ID={"primary": "[email protected]","th":"[email protected]","ko":[email protected]","kc":"[email protected]","hl":"[email protected]","ml":"[email protected]","fg":"[email protected]","q1":[email protected]","q2":"[email protected]","qc":[email protected]","dr":[email protected]","bb":"[email protected]","tt":"[email protected]","mc":"[email protected]","ak":"[email protected]","sk":"[email protected]","zk":"[email protected]"
};
const TIMEZONE = 'UTC+08:00';
module.exports.calendarUrl = CALENDAR_URL;
module.exports.serviceAcctId = SERVICE_ACCT_ID;
module.exports.calendarId = CALENDAR_ID;
module.exports.keyFile = KEYFILE;
module.exports.timezone = TIMEZONE;
//To use, require the module in your application and pass in the necessary config file.
/const CONFIG = require('./config/settings.js');
const CalendarAPI = require('node-google-calendar');
let cal = new CalendarAPI(CONFIG);/
export { CONFIG as default, ROOM_CONFIG, SESSION_LENGTH, BOOKING_DURATION_OPTIONS };
`
.env file:
TELEGRAM_BOT_TOKEN=xxxxxxxxxxxxxxxxxttl_xxxxxxxxxxxxxx [email protected] CALENDAR_ID={"primary": "[email protected]","th":"[email protected]","ko":[email protected]","kc":"[email protected]","hl":"[email protected]","ml":"[email protected]","fg":"[email protected]","q1":[email protected]","q2":"[email protected]","qc":[email protected]","dr":[email protected]","bb":"[email protected]","tt":"[email protected]","mc":"[email protected]","ak":"[email protected]","sk":"[email protected]","zk":"[email protected]" }; CALENDAR_URL=https://calendar.google.com/calendar/embed?src=xxxxx%40gmail.com&ctz=Asia%2FHong_Kong GOOGLE_KEYFILE_PATH=../data/xxxx-xxxx.pem
Please Help Thanks!!
Write unit tests
Set up CI (Travis) to:
Find a better way to store/share secrets
Manage user access list
I have had people forward messages to my group for over a year now no issues, randomly I woke up and a few people have warns for forwarding messages. I don't have anything blocked for forwarding messages, idk if it's a bug or something? I checked config, and everything looked to be the same as always.
I think it would be useful to send reminders to the user 5 min before the time slot starts and some actions to acknowledge or cancel the booking.
Also, maybe reminders 5 min before it ends to wrap up the meeting soon.
There have been times where I've booked a room in advance and forgot to cancel the booking when the meeting has been postponed.
device log:
Unhandled rejection Error: Error promptTimeslotSelection: {}
at /home/ubuntu/butler-bot/build/modules/TelegramBot.js:387:11
0|build | at tryCatcher (/home/ubuntu/butler-bot/node_modules/bluebird/js/release/util.js:16:23)
0|build | at Promise._settlePromiseFromHandler (/home/ubuntu/butler-bot/node_modules/bluebird/js/release/promise.js:510:31)
0|build | at Promise._settlePromise (/home/ubuntu/butler-bot/node_modules/bluebird/js/release/promise.js:567:18)
0|build | at Promise._settlePromise0 (/home/ubuntu/butler-bot/node_modules/bluebird/js/release/promise.js:612:10)
0|build | at Promise._settlePromises (/home/ubuntu/butler-bot/node_modules/bluebird/js/release/promise.js:687:18)
0|build | at Async._drainQueue (/home/ubuntu/butler-bot/node_modules/bluebird/js/release/async.js:133:16)
0|build | at Async._drainQueues (/home/ubuntu/butler-bot/node_modules/bluebird/js/release/async.js:143:10)
0|build | at Immediate.Async.drainQueues (/home/ubuntu/butler-bot/node_modules/bluebird/js/release/async.js:17:14)
0|build | at runCallback (timers.js:651:20)
0|build | at tryOnImmediate (timers.js:624:5)
0|build | at processImmediate [as _immediateCallback] (timers.js:596:5)
To handle recurrences and calculate upcoming event in the series, with the start, end and recurrence resp from google.
[ { kind: 'calendar#event',
etag: '"..."',
id: '....',
status: 'confirmed',
htmlLink: '...',
created: '2017-02-08T03:13:06.000Z',
updated: '2017-02-08T06:23:06.853Z',
summary: 'Meeting by ..',
location: 'FGD',
creator: { email: '...' },
organizer:
{ email: '[email protected]',
displayName: 'FGD Calendar',
self: true },
start:
{ dateTime: '2017-02-24T14:00:00+08:00',
timeZone: 'Asia/Singapore' },
end:
{ dateTime: '2017-02-24T15:00:00+08:00',
timeZone: 'Asia/Singapore' },
recurrence: [ 'RRULE:FREQ=WEEKLY;UNTIL=20170331T060000Z;BYDAY=FR' ],
... } ]
/contribute does not work. is it even necessary?
Unable to book room for the month of November. Today is 31 Oct
Excuse my stupidity, but I'm absolutely has no clue about how to use this package or how to install it. Do I just download it as a ZIP and then copy+paste it to my server (i'm using windows) or do I have to some serials of commands just like you shown here? And then where do I have to put it my webhook URL?
Thank you
Just curious if GCals are created for new meeting rooms?
Requested by SweeZharBo herself.
Possibly under /manage, can list users and a button to ban them. or a new function /ban to ban users
We can create a mapping between telegram usernames and LDAP entries and do even more cool stuff, like using the google cal API to send an event/invite to tech.gov.sg emails on bookings.
We can either:
Right now I'm trying to find out if we can have remote access to the LDAP server (sitting on a AWS VPC) from an ec2 instance...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.