DiscordWhitelist/autowl/__main__.py
Price Hiller a35755592c refactor: streamlining of main function
Update utilizing walrus operators, only importing the sub-namespace we
need from os & sys.
2023-01-27 13:07:54 -06:00

17 lines
405 B
Python

import discord
from os import environ
from sys import stderr
# main runtime function
def main():
if disToken := environ.get('DISCORD_TOKEN'):
print(f"Received discord token: {disToken}")
# Call into main action here, basically launch the bot via import to a lower module
else:
print("Unable to access DISCORD_TOKEN in environment!", file=stderr)
exit(1)
main()