Skip to main content

Bot Client for GradientChat

Project description

gradientchat

gradientchat is the official Python bot client module for GradientChat that is OOP-based.

Example

TestBot

import gradientchat

myBot = gradientchat.Bot("TestBot [t!]") # No prefix arg makes prefix first letter of name + "!"

@myBot.cmd
def ping():
	"""Returns \"Pong!\"""" # Docstring is used as description for the command
	return "Pong!"

myBot.connect()

Docs

gradientchat.Bot(name, pref)

If name is not str, raises TypeError, however if pref is not string and name is str, prefix will be lowercase of first character of name and a exclamation mark.

gradientchat.Bot.connect(servUrl)

Connects to server; if servUrl is str, connects to URL specified on servUrl; raises Exception if already connected.

@gradientchat.Bot.cmd

Decorator for adding a command; if called with a command name, command name will be set to the specified command name.

gradientchat.Bot.sendMsg

Sends a message.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gradientchat-2024.1.4.1.tar.gz (2.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gradientchat-2024.1.4.1-py3-none-any.whl (2.8 kB view details)

Uploaded Python 3

File details

Details for the file gradientchat-2024.1.4.1.tar.gz.

File metadata

  • Download URL: gradientchat-2024.1.4.1.tar.gz
  • Upload date:
  • Size: 2.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.2

File hashes

Hashes for gradientchat-2024.1.4.1.tar.gz
Algorithm Hash digest
SHA256 020e11e0762127130e840fcc082b38245d601af42743db50b69b44a618235a68
MD5 62b7996a49e9297160ae0f254772174e
BLAKE2b-256 fe5d0e432c3a6ab5bda951e64a31b851463dc2454af8a7b88ecd22659090569f

See more details on using hashes here.

File details

Details for the file gradientchat-2024.1.4.1-py3-none-any.whl.

File metadata

File hashes

Hashes for gradientchat-2024.1.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5fdaaacc701d8dc8bc6c178845485549372470acd93f22c553c245cef8e7aa42
MD5 3be553c7341022f4afd6b930f9d3c5ba
BLAKE2b-256 bbdcfd6fde046004cc73652cd309f438d620469c12f41d213bffb24914418217

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page