-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: add handshape of the day and topics * feat: add guild settings table to daily message * Execute instead of source * Fix script * Install quietly; make HOTD deterministic
- Loading branch information
Showing
20 changed files
with
614 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,11 +9,9 @@ GOOGLE_PRIVATE_KEY_ID="CHANGEME" | |
GOOGLE_PRIVATE_KEY="CHANGEME" | ||
GOOGLE_CLIENT_EMAIL="CHANGEME" | ||
FEEDBACK_SHEET_KEY="CHANGEME" | ||
# Mapping of guild IDs => gsheet keys | ||
SCHEDULE_SHEET_KEYS="123=321" | ||
# Comma-delimited list of channel IDs where to send daily schedules | ||
SCHEDULE_CHANNELS="456" | ||
TOPICS_SHEET_KEY="CHANGEME" | ||
DAILY_PRACTICE_SEND_TIME=14:00 | ||
GUILD_SETTINGS="" | ||
|
||
# Mapping of Discord usernames w/ discriminator => Zoom user email addresses or IDs | ||
ZOOM_USERS="bob#[email protected],alice#[email protected]" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import json | ||
from base64 import b64encode | ||
|
||
dev_guild_settings = [ | ||
# CHANGEME | ||
{ | ||
"guild_id": 123, | ||
"schedule_sheet_key": "changeme", | ||
"daily_message_channel_id": 321, | ||
"include_handshape_of_the_day": True, | ||
"include_topics_of_the_day": True, | ||
} | ||
] | ||
|
||
prod_guild_settings = [ | ||
# CHANGEME | ||
{ | ||
"guild_id": 123, | ||
"schedule_sheet_key": "changeme", | ||
"daily_message_channel_id": 321, | ||
"include_handshape_of_the_day": True, | ||
"include_topics_of_the_day": True, | ||
} | ||
] | ||
|
||
|
||
def encode_settings(settings): | ||
return b64encode(bytes(json.dumps(settings), "utf-8")).decode("utf-8") | ||
|
||
|
||
def main(): | ||
print("Dev settings:\n") | ||
dev_encoded = encode_settings(dev_guild_settings) | ||
print(f"GUILD_SETTINGS={dev_encoded}") | ||
|
||
print() | ||
|
||
print("Prod settings:\n") | ||
prod_encoded = encode_settings(prod_guild_settings) | ||
print(f"GUILD_SETTINGS={prod_encoded}") | ||
|
||
|
||
if __name__ == "__main__": | ||
main() |
Oops, something went wrong.