Skip to content
This repository has been archived by the owner on Oct 28, 2023. It is now read-only.
/ DO-Bot Public archive

A telegram bot for design odyssey programme in SUTD

Notifications You must be signed in to change notification settings

beazt123/DO-Bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Design Odyssey Telegram Chatbot

This is a Telegram chatbot developed to assist in SUTD Design Odyssey's educational programmes. It features semi-automated workshop reminders and also hosts important workshop information.

Motivation

This project saw an opportunity space in the mobile platform as a place to communicate with the students, as emails and posters tend not to capture the attention of the students.

API Reference

Language: Python Release Python 3.7.3 | Python.org

Python Telegram API: Python Telegram

Telegram API: Telegram Bot API

Setup

The following python libraries are used:

  • python telegram
  • pytz
  • googleapiclient

Note that this set of source code is tailored to be used on AWS Servers (Amazon Web Services).

Setting up a new python environment

In case you don't have the python library to help you create the virtual environment, run the following command

pip install virtualenv

Create your virtual environment. Choose any name for your virtual environment.

virtualenv <name of virtual environment>

Activate your virtual environment. For mac/linux users,

source <name of virtual environment>/bin/activate

For windows users,

source <name of virtual environment>/Scripts/activate.bat

Now, on the left of the current working directory, where you type your command, there should be the name of virtual environment encapsulated in brackets, something like,

(teleEnv) D:\Desktop\SUTD\5th rows\DO\DO EXCO\DO Bot\teleEnv\Scripts>  

Now you're ready to install the python dependency libraries stated above into the current virtual environment.

pip install pytz
pip install --upgrade google-api-python-client google-auth-httplib2 google-auth-oauthlib
pip install python-telegram-bot

You may observe in the source codes that another library named "boto3" is also imported. That library is part of AWS runtime libraries so it will be included in the runtime environment when you run your code on AWS servers.

Setting up your Google API key

You need to set up the api key before using python to access your google drive. Set up your own Python google API key by following the instructions in the link: Python Quickstart  |  Google Docs API  |  Google Developers

  1. Move all the files into the "site packages" folder.
  2. ZIP up the contents of the folder.

!!! caution Caution For Step 2, be sure to zip the contents inside the folder and not the folder itself !!!

For actual use, upload the zip file into an AWS lambda function

HOTO


  • Google api client credentials
  • Bot API key(optional)
  • AWS lambda account

About

A telegram bot for design odyssey programme in SUTD

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages