Giter Club home page Giter Club logo

auto_emoji's Introduction

auto_emoji

Note: recommend using Python 3.6.x (latest) -- discord library requires some finagling on Python 3.7.x

This is fairly simple script which attempts to automatically add an emoji to a message on Discord. Which user's message gets which emoji on which server is determined by the "user_list.txt". User and emoji ID are required for this to work.

Getting user/server ID https://support.discordapp.com/hc/en-us/articles/206346498-Where-can-I-find-my-User-Server-Message-ID-

Emojis can be stored within the user_list.txt file in the following format: USERID SERVERID emoji_name:111222333444555666

...or as a dictionary directly in the file

A prompt for capturing user credentials would likely make this more secure. Alternatively, import them as an environment variable (not sure how secure this is), or store them in a separate file as a class, as demonstrated here (not very secure)

To have this run periodically in the background via crontab:

from terminal:

crontab -e

press 'i' for insert mode, and enter the following

* * * * * /usr/local/bin/python3.6 /Users/user/Documents/auto_emoji.py >> ~/cron.log 2>&1

* * * * * represents the cron schedule: minutes hours day(of the month) months day(of the week) -- see crontab.guru for crontab tips/examples

the next piece /usr/local/bin/python3.6 represents the Python3.6 'executable' path, and /Users/user/Documents/auto_emoji.py is where ever the Python script is saved

>> ~/cron.log 2>&1 specifies to send all output (STDERR and STDOUT) to cron.log, instead of an email (recommend)

Once done editing, press esc then :wq to write(save) and quit

Finally, make sure to give the python file itself executable permissions:

chmod +x <python file>

auto_emoji's People

Contributors

kt-0 avatar

Watchers

James Cloos 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.