hellohook

Create your own welcome bot with a custom profile picture! Set the welcome message to be regular text and/or an embed. Comes with usernames, user avatars, pings/mentions, server member counts, and leave messages. Send invite-based welcome messsages, and assign custom roles when new members join with the invite!

  • welcome
  • invites
  • goodbye
  • webhook
  • roleinvite
  • roleinvites

Install

To get started, first set up your own Red Discord Bot. Then, run these commands:

[p]repo add coffee-cogs https://github.com/coffeebank/coffee-cogs
[p]cog install coffee-cogs hellohook

This cog does not store any End User Data.


Drafting your Webhook Message

Get started on Discohook >

When you are done on Discohook:

  • Scroll to the bottom
  • Click "JSON Data Editor"
  • Click "Copy to Clipboard"
  • Paste it into the bot command

Disclaimer: Discohook is a website that makes creating webhooks easy. Not affiliated with this cog. Image from Unsplash.


Adding a color is required if you're using embeds.
You can use #222222 as a default. If you don't, Discohook returns null in the JSON, which breaks compatibility. This is a workaround.


Variables

  • https://&&SERVERCOUNT&&
    • for server member count (268)
  • https://&&SERVERCOUNTORD&&
    • for server member count with the th/st/nd ordinals (268th)
  • https://&&USERAVATAR&&
    • for user profile picture url
  • https://&&USERMENTION&&
    • for user mention (<@1234567890123456>)
    • User mentions can only be used in Content, or the Embed's Body Description, or they won't appear correctly.
  • https://&&USERNAME&&
    • for username as text (Clyde)
  • https://&&USERNAME1234&&
    • for username#1234 as text (Clyde#1234)

Adding https:// in front is required.
Discohook will not export the needed JSON if it says "Invalid URL" (even though the bot will make them valid at runtime), so this is a workaround.


Examples

After you save them into the bot, when a new user joins, the variables will be replaced with the new user's info.


Why?

Life was once peaceful in the land of Cats. As the land grew, the Cats community decided to run its own bot, named the Cat Lord. The Cat Lord welcomed every cat that passed through its gates.

Then, one day, the land of Dogs found the Cat Lord a very helpful bot. However, the Dogs were not large enough yet to justify running its own bot. Yet, it would be a bad idea all the same to welcome new dogs with a bot named "The Cat Lord".

An agreement was made, and Hellohook was born.

Despite being a single bot, the welcome messages can finally be unique between both lands.

The Cat Lord lives on. The Dog Lord is born.

All live in harmony forevermore.


FAQ

Hellohook and the test command doesn't send anything!

First, check your Red Bot console, and see if they match any of the errors below:

No module named

As of Red 3.5, you may have run into an error No module named requests. Shut down your Red bot, then run pip install requests before redbot ##### to start it back up.

For any other module/package, run pip install PACKAGENAMEHERE.

Afterwards, re-set your hellohook greet/leave message (even with no changes) to force an update.

As of 17 August 2023, this has been patched, but may happen again in the future, and with different modules/packages. If it does, please let me know in the Support Discord or file a GitHub bug report.

send() got an unexpected keyword argument

If it says send() got an unexpected keyword argument '####', please let me know in the Support Discord or file a GitHub bug report.

As of 10 June 2022, this has been patched, but may happen again in the future.

How do I send a webhook styled as the person who joined?

This feature is not recommended. Hellohook does not officially support this feature, since it may be against Discord's ToS.

But, Hellohook is open-source, so you are free to customize the bot by forking the code.

In the code, find the marker MM101, and add the code below:

            # (MM101) Add custom parameters here
            greetMessageJson["username"] = userObj.display_name
            greetMessageJson["avatar_url"] = userObj.display_avatar.url

Forking Hellohook

Hellohook is flexible, but may not be flexible enough for everyone's needs. Hellohook is open-source and encourages you to customize by making tweaks.

Fork Repo

  1. Go to coffeebank/coffee-cogs and click Fork at the top. Check to only fork master branch.
  2. You should now be at USERNAME/coffee-cogs. Click into hellohook folder here
  3. Make the edits you would like, then click Save (join the Support Discord if you need help)
  4. Add the repo to your bot by typing in Discord (replacing with your GitHub username from above):
    [p]cog uninstall hellohook
    [p]repo add coffee-cogs2 https://github.com/USERNAME/coffee-cogs
    [p]cog install coffee-cogs2 hellohook

Updates

  1. Visit your copy of the GitHub repo at USERNAME/coffee-cogs
  2. Click "Fetch upstream" and merge updates
  3. On Discord, type:
    [p]cog update hellohook