Skip to content

genba2/QuantumJump

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

QuantumJump

A work in progress bot for JumpInChat

Prerequisites

QuantumJump requires at least Python 3.8

Optionally, you can use pipenv to manage the virtualenv

A few Python modules are required:

QuantumJump is confirmed working on GNU/Linux, the status of operation on other operating systems is currently unknown. Feel free to give it a go and report back.

Installation

With pipenv

pipenv install

With pip

pip3.8 install --user websockets tomlkit aiohttp beautifulsoup4 wikipedia aiohttp_socks pytz

Running

With pipenv

pipenv run python run.py

With python

python3.8 run.py

Upon first run the bot will search for config.toml, if it doesn't exist it will walk you through configuration.

Porting To QuantumJump

makeCommand

@makeCommand(name="ping", description="Reply to ping")
async def replytoping(self, c: Command):
    await self.send_message("Pong!") # quantum: Pong!
    # or if you want third person
    await self.send_action("pongs") # *quantum pongs

event

from lib.styling import Colors, Styles
@event(event="room::message")
async def message(self, message: Message):
    msg = message.message
    if "ping" in msg:
        # colorize or stylize your message
        await self.send_message("Pong!", color=Colors.red, style=Styles.script)
        # quantum: 𝓟𝓸𝓷𝓰! 

Commands

Builitins

Command Argument Description
uptime N/A current uptime
version N/A current version and latest version
timer seconds count down

Fun

Command Argument Description
roll sides dice roll dice, default is 1 die, 6 sides
rate things rate a thing out of 10
8ball question standard magic 8ball

Movie

Command Argument Description
imdb query search The Movie Db for TV and movies

Tokes

Command Argument Description
420hour N/A toggle hourly 420 notifications
tokes seconds call tokes in a bit
cheers N/A Cheers!

Youtube

Command Argument Description
yt title or url play a video

Urban

Command Argument Description
urb query search Urban Dictionary

About

bot loop jumpin chat for kindred spirits.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.7%
  • Shell 0.3%