This tiny app will send a message to LINE group when a member has joined the Discord guild voice channel.
When I am in a Discord server (or guild) and do care about the members connecting to voice channels, I want to receive notifications from LINE at the moment.
Bridge the gap using Discord-bot Python SDK and LINE Notify API.
-
Create a Discord bot, please refer to: https://discord.com/developers/docs/intro
-
Invite your Discord bot into your Discord server (or guild).
-
Get a LINE Notify token (bounded to a LINE group), please refer to: https://notify-bot.line.me/my/
-
Inivite LINE Notify into the token-bounded LINE group.
-
Clone this repository and
cd
into the folder. -
Prepare your environment variables:
LINE_NOTIFY_TOKEN DISCORD_BOT_TOKEN MESSAGE_TEMPLATE WHITELIST_CHANNELS
- To get the
LINE_NOTIFY_TOKEN
, please refer to: https://notify-bot.line.me/my/ - To get the
DISCORD_BOT_TOKEN
, please refer to: https://discord.com/developers/docs/intro MESSAGE_TEMPLATE
: a message string with 3 arguments:userName
,guildName
,channelName
.WHITELIST_CHANNELS
: includes all the whitelist channel ids (delimited by colon;
)Whitelist channels: when a member connect to a whitelist channel, there will be a notification sent to LINE group.
- To get the
-
Install requirements:
$ pip install -r requirements.txt
-
Activate environment:
- Windows:
$ .\env\Scripts\activate
- Linux/MacOS:
$ source ./venv/bin/activate
- Windows:
-
Execution:
$ python main.py
This app is deployed on Heroku.
Discord-bot, LINE Notify API, Python