Posting new submissions to a Discord Channel

A Tutorial for GameBanana

A guide on how to automatically post new GameBanana submissions to the your Discord Servers.

1. RSS Feed Api

The base RSS Feed url for new submissions is https://api.gamebanana.com/Rss/New

The first thing to do is select which submissions you would like to recieve. You can do this by adding parameters to the RSS url. All the parameters are viewable here https://api.gamebanana.com/docs/endpoints/Rss/New. Something worthwhile noting is that you can filter by multiple itemtypes, e.g https://api.gamebanana.com/Rss/New?itemtype=Skin,Map,Tool,Thread.

To keep things simple for this tutorial we are going to stick with just filtering by game and so use this as our example RSS url https://api.gamebanana.com/Rss/New?gameid=8

2. Methods to post to Discord

2.1. Discord Bots

The simpler way to set up automatic posting is to use a Discord Bot that is capable of accessing RSS feeds. Some multiple purpose bots do have this ability but you can also use bots made just for this function like Discord.RSS ( invite link for the bot ).

Simply follow the instructions for the bot you decide on and connect it up to your chosen RSS url, so for example if I was using the Discord.RSS bot I would type in the channel I wish the bot to post to ~rssadd https://api.gamebanana.com/Rss/New?gameid=8

Discord.RSS lets you customize lots of things like the content of the message, full documentation is here https://github.com/synzen/Discord.RSS/wiki or just type ~rsshelp once you have the bot in the channel.

The advantages of using a bot is that they generally perform checks more often and so will post new content quicker than other methods. The downside is that unless you host the bot yourself, you are relying on someone else's hosting on the bot which has no guarantees to be stable or to stick around. Also unless you host the bot yourself, you can't change certain things like the avatar of the bot. 

2.2. Discord Webhooks

To take advantage of Discords Webhooks option you are going to need some 3rd party site to convert the RSS feed into webhooks. Popular sites for this kind of thing are https://ifttt.com and https://zapier.com/.

For this example we will use IFTTT.com. First create an IFTTT account if you don't already have one and then head to https://ifttt.com/create . Hit the '+this' button and then select the 'RSS Feed' option. Pick 'New feed item' and then enter your selected RSS url and create the trigger. Hit the '+that' button and select the Webhooks option and then pick 'Make a web request'. Now we must get your webhook url so head over to your discord server and pick which channel you wish to post the submissions to. Hit 'Edit Channel' on that channel, go to the Webhooks option and press 'Create Webhook'. Copy the url provided and go back to IFTTT to paste it into the URL field. Set the Method to POST, the Content Type to 'application/json' and you in Body we're going to add { "username":"Gamebanana", "content":"<<<{{EntryTitle}}>>> : <<<{{EntryUrl}}>>>" } . Hit 'Create Action' and finally press 'Finish'. You should be set up and ready to go. 

You can do a lot more with the Body field to customise your message and the content of it. This page has  a good rundown of what is possible https://gist.github.com/Birdie0/78ee79402a4301b1faf412ab5f1cdcf9

These sites generally only check a few times an hour and so aren't as responsive as some bots. However they are usually more stable and so more likely to make sure everything does get posted. I personally found them to be quite temperamental however and may need a lot of fiddling to get setup. Another advantage is that as you are creating your own 'Bot', you can customize it via the webhooks setting page in Discord and give it it's own avatar etc.

3. Notes

Out of my testing of both methods, the bot has proven better so far. It is quicker to post, easier to set up and easier to test. Let me know how you all get on with your setups.
Sign up to access this!

Embed

Share banner
Image URL
HTML embed code
BB embed code
Markdown embed code

Credits

Key Authors
Mini avatar
Mini username pic Joined 11y ago
CivVI Manager Admin
Offline
14,842 points Ranked 313rd
49 medals 7 legendary 10 rare
  • 1st Place - Winter Sprays Contest Medal icon
  • Guardian of the Acid Milk Medal icon
  • Achieved Admin clearance Medal icon
  • Returned 5000 times Medal icon
  • 10 years a member Medal icon
  • 2017 Top Contributor Medal icon
Writer

Submitter

Mini avatar
Mini username pic Joined 11y ago
CivVI Manager Admin
Always Watching
14,842 points Ranked 313rd
49 medals 7 legendary 10 rare
  • 1st Place - Winter Sprays Contest Medal icon
  • Guardian of the Acid Milk Medal icon
  • Achieved Admin clearance Medal icon
  • Returned 5000 times Medal icon
  • 10 years a member Medal icon
  • 2017 Top Contributor Medal icon

Mini avatar
Mini

Creator
Sign up to access this!
Sign up to access this!
Sign up to access this!

Game

Sign up to access this!

Category

Details

Difficulty Level
Beginner

Attributes

Miscellaneous
rss

Share

  • Share on Reddit
  • Share on Twitter
  • Share on Facebook
  • Share on Google+
  • Today's Pick Dec 15 2018
  • 282 Views
  • 1 Posts
  • 1moSubmitted
  • 1moModified

Scores

  • Not yet rated
Sign up to access this!

More from Submitter

More Other/Misc Tutorials

bcp.crwdcntrl.net tracking pixel