mirror of
https://github.com/AsgardEternal/DiscordWhitelist.git
synced 2025-01-02 13:19:14 -06:00
Price Hiller
a35755592c
Update utilizing walrus operators, only importing the sub-namespace we need from os & sys.
17 lines
405 B
Python
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()
|