Giter Club home page Giter Club logo

dc2line's Introduction

Introduction

This tiny app will send a message to LINE group when a member has joined the Discord guild voice channel.

Motivation

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.

Goal

Bridge the gap using Discord-bot Python SDK and LINE Notify API.

Usage

  • 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.

  • Install requirements: $ pip install -r requirements.txt

  • Activate environment:

    • Windows: $ .\env\Scripts\activate
    • Linux/MacOS: $ source ./venv/bin/activate
  • Execution: $ python main.py

Deployment

This app is deployed on Heroku.

Keywords

Discord-bot, LINE Notify API, Python

dc2line's People

Contributors

trithong12 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.