Skip to content
This repository has been archived by the owner on Jul 18, 2020. It is now read-only.
/ groupme-discord Public archive

Sync a Discord channel with a GroupMe chat seamlessly.

Notifications You must be signed in to change notification settings

jerbob/groupme-discord

Repository files navigation

GroupMeDiscord

Codacy Badge Build Status Updates

Some Python scripts to interface between Discord and GroupMe.

Requirements

These scripts require Python 3.6+.
Before starting, make sure that you install the requirements with:

cd ~/path/to/GroupMe/
python3 -m pip install -r requirements.txt

If you have issues with the discord.py installation, use the following command:

python3 -m pip install -U https://github.com/Rapptz/discord.py/archive/rewrite.zip#egg=discord.py

You also need to be able to expose the flask webserver.
If you already know how to do this, change the run_locally variable in config.ini to false.

If not, The easiest method to do this is by using the ngrok tool. View the documentation here.
Once ngrok is setup and authorized, execute the following command to recieve your ngrok URL (you'll need this later):

ngrok http 5000

Keep this process running as you start the application.

Discord Bot

In order to send messages from Discord to GroupMe, you will need to create a Bot Application.
To do this, first go to https://discordapp.com/developers/applications/me and login with your Discord account. Click "New App", fill in your App name, then click "Create App". image
You should be redirected to the application page of your bot.
Scroll down to the following prompt and select "Create a Bot User":
image
You will now be able to view the token of your bot application. image
Copy this token and paste it into your config.ini file: image

Webhook

The webserver will be sending GroupMe messages to a dedicated channel by using a Discord Webhook.
To create a webhook, navigate to a channel's edit page and select "Webhooks".
After creating a webhook, copy the webhook URL shown:
image
And paste it into your config file: image
There's just one more thing to do on the Discord side: enable User Settings -> Appearance -> Developer Mode and right click the channel that the webhook is using. Paste this number into your config file too: image

GroupMe

Now that you've set up the Discord constants, you'll also need to setup your GroupMe Bot.
Navigate to https://dev.groupme.com/bots, login with your GroupMe account, and click "Create Bot". image
Fill in the appropriate fields, and in the Callback URL field, enter the URL that you got from ngrok. image
Once you've created the Bot, click on the bot's field to see the Bot ID. Copy this string and paste it in your config file:
image image
One more to go! On the same page, click the "Access Token" button to retrieve your access token. Copy this string and paste it into your config file:
image image

Usage

Now run the application:

python3 main.py

You should see any messages appear in the chosen Discord channel, and you will also be able to send messages and images to the GroupMe chat.

About

Sync a Discord channel with a GroupMe chat seamlessly.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages