Page MenuHomePhabricator (Chris)

No OneTemporary

Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
diff --git a/.gitignore b/.gitignore
index cd2946a..dfb3c41 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,47 +1,51 @@
+start.bat
+
+
+
# Windows image file caches
Thumbs.db
ehthumbs.db
# Folder config file
Desktop.ini
# Recycle Bin used on file shares
$RECYCLE.BIN/
# Windows Installer files
*.cab
*.msi
*.msm
*.msp
# Windows shortcuts
*.lnk
# =========================
# Operating System Files
# =========================
# OSX
# =========================
.DS_Store
.AppleDouble
.LSOverride
# Thumbnails
._*
# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
diff --git a/main.py b/main.py
index 92ac5d6..67d46dd 100644
--- a/main.py
+++ b/main.py
@@ -1,4 +1,25 @@
-#Yo yo yo yo
+#This code is very sloppy, I am aware
+#I will clean it up when I've got some more time
+import sys
+import time
import telepot
-bot = telepot.Bot('258778063:AAHhupgWlFBhUWR1on4zNq0dqz8GFXtSATk')
-print bot.getMe()
+
+TOKEN = sys.argv[1]
+
+def chat_handle(msg):
+ content_type, chat_type, chat_id = telepot.glance(msg)
+
+ if content_type == 'text':
+ if "hendrik" in (msg['text'].lower()):
+ bot.sendMessage(chat_id, 'Who the fuck is Hendrik?', reply_to_message_id=msg['message_id'])
+
+
+
+bot = telepot.Bot(TOKEN)
+bot.message_loop(chat_handle)
+
+print ('Bot Running ...')
+
+# Keep the program running.
+while 1:
+ time.sleep(10)

File Metadata

Mime Type
text/x-diff
Expires
Mon, Jun 15, 11:36 PM (2 w, 3 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
69853
Default Alt Text
(1 KB)

Event Timeline