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 = {}
|
||||||
|
|
||||||
def page(receiver, text, user):
|
|
||||||
|
|
||||||
number=""
|
|
||||||
|
|
||||||
|
|
||||||
# CONFIGURE YOUR USERS HERE
|
# CONFIGURE YOUR USERS HERE
|
||||||
|
|
||||||
# if(receiver=="someone"):
|
# phonebook["someone"] = "123456"
|
||||||
# number="1234567"
|
# phonebook["someoneelse"] = "7654321"
|
||||||
# elif(receiver=="someoneelse"):
|
|
||||||
# number="7654321"
|
|
||||||
|
|
||||||
|
def page(receiver, text, user):
|
||||||
|
|
||||||
|
if receiver in phonebook:
|
||||||
|
number = phonebook[receiver]
|
||||||
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