2023-01-27 11:58:14 -06:00
|
|
|
import os
|
2023-01-27 13:49:55 -06:00
|
|
|
from sys import stderr
|
2023-01-27 11:27:26 -06:00
|
|
|
import discord
|
|
|
|
|
2023-01-27 11:58:14 -06:00
|
|
|
|
|
|
|
# run init stuff inside this function
|
|
|
|
def init():
|
|
|
|
# make sure this prints the discord token
|
|
|
|
# set this up as a runtime environment variable, DO NOT HARDCODE THE TOKEN
|
2023-01-27 13:49:55 -06:00
|
|
|
distoken = os.environ.get("DISCORD_TOKEN")
|
|
|
|
if not distoken:
|
|
|
|
print("Unable to find discord token in environment!", file=stderr)
|
2023-01-27 11:58:14 -06:00
|
|
|
exit(1)
|
|
|
|
|
2023-01-27 13:49:55 -06:00
|
|
|
print(f"discord token:{distoken}")
|
2023-01-27 11:58:14 -06:00
|
|
|
|
|
|
|
|
|
|
|
init()
|