Now stores numbers in a dict
This commit is contained in:
parent
2ca58e1fca
commit
951d64ab7e
17
PagerBot.py
17
PagerBot.py
@ -33,20 +33,17 @@ import time
|
|||||||
import smtplib
|
import smtplib
|
||||||
|
|
||||||
|
|
||||||
|
phonebook = {}
|
||||||
|
|
||||||
|
# CONFIGURE YOUR USERS HERE
|
||||||
|
|
||||||
|
# phonebook["someone"] = "123456"
|
||||||
|
# phonebook["someoneelse"] = "7654321"
|
||||||
|
|
||||||
def page(receiver, text, user):
|
def page(receiver, text, user):
|
||||||
|
|
||||||
number=""
|
if receiver in phonebook:
|
||||||
|
number = phonebook[receiver]
|
||||||
|
|
||||||
# CONFIGURE YOUR USERS HERE
|
|
||||||
|
|
||||||
# if(receiver=="someone"):
|
|
||||||
# number="1234567"
|
|
||||||
# elif(receiver=="someoneelse"):
|
|
||||||
# number="7654321"
|
|
||||||
|
|
||||||
else:
|
else:
|
||||||
return "The username you tried to page has no number saved."
|
return "The username you tried to page has no number saved."
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user