GithubHelp home page GithubHelp logo

dank's Introduction

dank

Bot to play the discord "Dank memer" bot game

Running the bot

Dependencies

  • pynput: pip install pynput

Run the dank.py file, you have 10 seconds to put your text cursor on your discord message box.

Options

You can edit the commands used by the bot by editing the OPTIONS variable

postmeme = lambda: "pls postmeme\n"+ choice(["n", "r", "e", "d"]) + "\n"

OPTIONS = [
    {"command": postmeme, "reset_time": 60},
    {"command": lambda: "pls fish\n", "reset_time": 45},
    {"command": lambda: "pls beg\n", "reset_time": 45}
]

The example above is the default options.

To include a new option, create a new dictionary with the keys "command" and "reset_time".

The value of "command" is a function that returns the string that you want to type, the simplest way to do so is using anoymous function expressions lambda: <return value>, you can also write functions like postmeme that include logic.

The value of "reset_time" is an integer representing the time to wait before typing out the value specified in "command" again.

Do include the \n as it tells the program to press ENTER.

Terminating the Program

At the default settings, you can terminate the program by pressing the END key. You can change this by editing the TERMINATE_KEY variable.

TERMINATE_KEY = keyboard.Key.end # Terminate with 'end' key
TERMINATE_KEY = keyboard.key.esc # Terminate with escape key
TERMINATE_KEY = keyboard.key.backspace # Terminate with backspace

You can find the list of options in the docs of pynput: https://pynput.readthedocs.io/en/latest/keyboard.html#reference

dank's People

Contributors

jeevesh2002 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 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.