|
@@ -50,31 +50,6 @@ def post_groupme_message(msg, group_id):
|
|
|
except requests.exceptions.HTTPError as h:
|
|
|
app.log_exception(h)
|
|
|
|
|
|
-sponsor_count = 1
|
|
|
-sponsors = [
|
|
|
- ("RAID: Shadow Legends - the hot new mobile game with over a billion players", "RAIDBOT"),
|
|
|
- ("SquareSpace - it's like if VistaPrint was more expensive", "WEBBOT"),
|
|
|
- ("Raycon Earbuds - the best true wireless earbuds that sponsor Rollbot", "ROLLBUDS"),
|
|
|
- ("DoorDash - we maybe stopped stealing tips", "DOORBOT"),
|
|
|
- ("Totinos - I love their products", "TOTINOS"),
|
|
|
- ("Stamps dot com - do people still send letters?", "STAMPBOT"),
|
|
|
- ("Bowl and Branch - not the people that make linens, we just sell bowls and branches", "BOLLBOT"),
|
|
|
- ("Audible dot com - sign up today for a free license to view an eBook", "READBOT"),
|
|
|
- ("MeUndies - think about rollbot but on your junk", "ROLLBOXERS I guess"),
|
|
|
- ("PepsiCo Products - the refreshing taste of PepsiCo products", "Sinaltrainal v. Coca-Cola Co."),
|
|
|
- ("RAIDCON Shadow Buds - nightmare nightmare nightmare nightmare", "nightmarenightmarenightmare"),
|
|
|
-]
|
|
|
-
|
|
|
-
|
|
|
-def post_sponsored(msg, group_id):
|
|
|
- global sponsor_count
|
|
|
- if random.randint(1, 2) == 2:
|
|
|
- sponsor_count += 1
|
|
|
- (sponsor, code) = sponsors[sponsor_count] if sponsor_count < len(sponsors) else (None, None)
|
|
|
- if sponsor:
|
|
|
- post_groupme_message(f"This action was sponsored by {sponsor}! Use code {code} for {random.choice([10, 15, 25])}% off!", group_id)
|
|
|
- post_groupme_message(msg, group_id)
|
|
|
-
|
|
|
|
|
|
app = Flask(__name__)
|
|
|
app.config["PROPAGATE_EXCEPTIONS"] = True
|
|
@@ -84,7 +59,7 @@ rollbot = Rollbot(
|
|
|
aliases=get_config("aliases"),
|
|
|
responses=get_config("responses"),
|
|
|
sleep_time=float(get_config("sleep_time")),
|
|
|
- callback=post_sponsored,
|
|
|
+ callback=post_groupme_message,
|
|
|
session_factory=db.Session
|
|
|
)
|
|
|
app.logger.info("Initializing database tables")
|