Skip to content
This repository was archived by the owner on May 14, 2025. It is now read-only.

Server Usage

Spectrollay edited this page Aug 13, 2024 · 12 revisions
简体中文 | English
Language translations may not be 100% accurate

Import Module

from RyhBotPythonSDK import Server

Receive normal messages

@Server.Message.Normal
def NormalHandle(data):
    # Your Logic codes

Receive command message

@Server.Message.Command
def CommandHandle(data):
    # Your Logic codes

Add robot message

@Server.Message.BotFollowed
def BotFollowedHandle(data):
    # Your Logic codes

Delete robot messages

@Server.Message.BotUnFollowed
def BotUnFollowedHandle(data):
    # Your Logic codes

Robot Settings Message

@Server.Message.BotSettings
def BotSettingsHandle(data):
    # Your Logic codes

User join message

@Server.Message.GroupJoin
def GroupJoinHandle(data):
    # Your Logic codes

User exit message

@Server.Message.GroupLeave
def GroupLeaveHandle(data):
    # Your Logic codes

Start the service

# Your Logic codes

Server.Start(
    host="Host"
    port= Port  #Int
    debug= Yes (True) No (False) Enable debug mode  #Bool
)

This document is written by English and 简体中文.

English


本文档由English和简体中文编写。

简体中文

Clone this wiki locally