● [MOD] - Donatify Discord Bot

Fri Nov 10, 2023 9:33 pm
Clan Leader
Top Dog
Nuke Dev / Coder
3041 Posts
coRpSE
In-Game
Once Human

Most Played:
This week: 134.8hrs.
Total Played: 135hrs.


  
Reputation: 7383.9
votes: 7
This is a mod that I whipped up real fast due to a request from a friend. There are no fancy controls for the Donatify is not my module and I know we have an update coming out, so I didn't want to get too much into it. If Lonestar wants to take what I have done and implement it into his next update for the module, I am okay with that.

What is this mod?

Well, it's a simple script that post a message onto discord in a specific channel you set up. It's a simple message that will look something like this:

Expand

There are no backend controls for it. It is all hard coded, so you will need to do edits manually in the PHP file. Here are the instructions for installing and setting up.


Installation:

  1. Download the attached file and extract the folder to your desktop.

  2. Open: public_html/modules/Donatify/includes/broadcastDonation.php using a code editor, (DO NOT use Notepad or Wordpad.), and follow the instructions within the file.

  3. Open: public_html/modules/Donatify/includes/functions.php

    • FIND:

      PHP:  [ Select all ]

      add_search_words('single'$post_id$donation_post_text$donation_topic_name);
              endif; 

       
    • AFTER ADD:

      PHP:  [ Select all ]

      global $nukeurl;
              include_once(
      './modules/Donatify/includes/broadcastDonation.php');
              
      broadcastDono($data['username'], $post_id$nukeurl); 

       
    • SAVE & CLOSE


  4. Next, upload the "public_html/modules/Donatify/includes/broadcastDonation.php" file into the public_html/modules/Donatify/includes/ folder on your site. Basically, just upload it, keeping the folder structure.



Now, if you configure it right, next time you get a donation in, it should post to discord. You do need to have the Donatify module making post to your forums for it to post to discord.


Expand
Fri Nov 10, 2023 9:35 pm
Original Poster
Clan Leader
Top Dog
Nuke Dev / Coder
3041 Posts
coRpSE
In-Game
Once Human

Most Played:
This week: 134.8hrs.
Total Played: 135hrs.


  
Reputation: 7383.9
votes: 7
I forgot to mention, if you put your site into sandbox mode and test using the sandbox, it will post to discord as well as your forums. Just remember to delete those fake donations when you can after you are done testing.

Otherwise, keep donating to your self to test if you don't want to do it in sandbox mode.


 
Forums ©