Closed simonnarang closed 8 years ago
No problem, feedback is very welcome. :)
I think you've pasted the token instead of environment variable name. I.e. if the code contains: ` let token = readToken("MY_BOT_TOKEN") the bot will try to read the token from MY_BOT_TOKEN environment variable or from a file named MY_BOT_TOKEN.
So, add export MY_BOT_TOKEN="347784237.....etc" to ~/.profile
then reload the environment by calling source ~/.profile
If you're using Xcode, add it to Environment variables in Xcode instead.
Optionally, create a file named MY_BOT_TOKEN in the directory from which the bot is started and put the token into the file.
You'll probably want to regenerate the bot's token now as it's been exposed.
Ok thanks... 😅 I assumed that the export command just changed that bit of code in main.swift
Sorry to give you another issue...
I'm not quite sure what to do, I followed the instructions in the wiki and swift build worked fine, I got this error after running
./build/debug/Fun-Bot