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
|
||||
|
||||
|
||||
|
||||
|
||||
def page(receiver, text, user):
|
||||
|
||||
number=""
|
||||
|
||||
phonebook = {}
|
||||
|
||||
# CONFIGURE YOUR USERS HERE
|
||||
|
||||
# if(receiver=="someone"):
|
||||
# number="1234567"
|
||||
# elif(receiver=="someoneelse"):
|
||||
# number="7654321"
|
||||
# phonebook["someone"] = "123456"
|
||||
# phonebook["someoneelse"] = "7654321"
|
||||
|
||||
def page(receiver, text, user):
|
||||
|
||||
if receiver in phonebook:
|
||||
number = phonebook[receiver]
|
||||
else:
|
||||
return "The username you tried to page has no number saved."
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user