Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
NNTin committed Jan 10, 2019
2 parents a1786d4 + fe8dd12 commit 7f452e6
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 9 deletions.
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ Got questions? [Join the bot's discord server!](https://discord.gg/Dkg79tc)
Remember to [activate](https://i.imgur.com/zOfa0Qm.png) the app. [View the logs here.](https://i.imgur.com/tWBoTuB.png)
Use this to initially deploy your discord-twitter-bot.

To further configure the bot get Heroku CLI and run launcher.py.
To further configure the bot get Heroku CLI and run launcher.py. (**Warning:** This is not recommended for inexperienced users since a lot of things could go wrong. Troubleshooting support will not be provided.)

```coffeescript
heroku login
heroku git:clone -a <your heroku app name>
heroku create <your heroku app name>
cd <your heroku app name>
git remote add origin https://github.com/NNTin/discord-twitter-bot
git pull origin master
Expand All @@ -28,14 +28,16 @@ git commit -am "updated configuration"
git push heroku
```

Heroku is a nice solution to host the bot for free.
This will create a data.json and the bot will ignore any set environment variable.

## YT Video to Heroku Deployment

[![YT Video](https://img.youtube.com/vi/NwPcXBvStSI/0.jpg)](https://www.youtube.com/watch?v=NwPcXBvStSI)

## Normal Setup

(**Warning:** This is only recommended for experienced users who have some basic experience with CLI.)

Get Python >=3.5.3, <3.7

```coffeescript
Expand All @@ -46,7 +48,7 @@ python3 discord-twitter-bot/launcher.py
```

First two lines are skip-able but are recommended if you are relying on an older version of discord.py.
Third line clones the rewrite branch. Fourth line executes launcher.py
Third line clones the GitHub project. Fourth line executes launcher.py

Once you have set everything up you can run main.py directly. (Useful in combination with systemd, Upstart, PM2, etc.)

Expand Down
7 changes: 3 additions & 4 deletions app.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
{
"name": "Discord Twitter Bot",
"description": "Posts Twitter tweets to Discord through Webhook",
"keywords": [
Expand All @@ -7,8 +7,7 @@
"twitter",
"tweets"
],
"website": "https://nntin.github.io/discord-logo/",
"repository": "https://github.com/NNTin/discord-twitter-bot",
"website": "https://nntin.xyz/",
"logo": "https://i.imgur.com/11zvdoc.png",
"env": {
"CONSUMER_KEY": {
Expand Down Expand Up @@ -50,4 +49,4 @@
"required": false
}
}
}
}
14 changes: 13 additions & 1 deletion issues.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,16 @@ That's a tough one I cannot easily answer.
There was one guy who had a Twitter account since 2009 and it took him 3 weeks to get his app approved.
Meanwhile when he created a new account and applied for it it got accepted right away. Another guy had his app approved after he confirmed his e-mail.

So my advice is to confirm e-mail and if that doesn't work create a (throwaway) Twitter account with confirmed e-mail and try again.
So my advice is to confirm e-mail and if that doesn't work create a (throwaway) Twitter account with confirmed e-mail and try again.

#### Configuration with Heroku is limited

I offer Heroku support because it is easy to use. With a [few clicks](https://www.youtube.com/watch?v=NwPcXBvStSI) you have your bot up and running for free. If you want to follow more twitter users or maintain multiple twitter id lists each posting to a different text channel and so on you will have to manually set it up.

This is **not** a user friendly process and can be overwhelming for a novice. The degree of difficulty is similar to hosting it on a VPS.

The very reason I offer Heroku support is because it eliminates a lot of user created errors. It's a nightmare for me to troubleshoot the errors. For instance people already have Python installed and rely on libraries with different versions (use venv...). They have Python installed but do not know how to call it or they are calling Python but unbeknown to them they are using a different version or they haven't added Python to PATH or they are opening Python by opening python.exe instead of calling it from CLI...
This is why I won't offer more support than this. There is also git, Heroku CLI. People often get stuck because they are too many things they need to be aware of. Forgetting a single step means the program won't run. And the steps may look different from system to system.

See [README.md](https://github.com/NNTin/discord-twitter-bot) on how to host the bot with Heroku and using launcher.py. This will create a data.json and any environment variables set in Heroku will be ignored.
Further assistance will not be given.

0 comments on commit 7f452e6

Please sign in to comment.