FireBot/bare.py

70 lines
1.5 KiB
Python
Raw Normal View History

#!/usr/bin/python3
from socket import socket
from overrides import bytes, bbytes
2023-11-09 21:37:35 +00:00
from typing import NoReturn, Union
2024-03-06 18:33:04 +00:00
from pylast import LastFMNetwork
from markov import MarkovBot
2023-11-09 21:37:08 +00:00
logs = ...
re = ...
cmds = ...
conf = ...
sleep = ...
reload = ...
r = ...
handlers = ...
2024-04-07 05:38:49 +00:00
def mfind(message: str, find: list, usePrefix: bool = True) -> bool: ...
class bot:
gmode: bool
server: str
nicklen: int
address: str
port: int
channels: dict[str, int]
interval: int
__version__: str
nick: str
adminnames: list[str]
2024-02-15 03:17:08 +00:00
queue: list[bbytes] # pyright: ignore [reportInvalidTypeForm]
sock: socket
npallowed: list[str]
2023-11-20 15:19:44 +00:00
current: str
2024-02-15 03:17:08 +00:00
tmpHost: str
ignores: list[str]
2024-03-06 18:33:04 +00:00
threads: list[str]
lastfmLink: LastFMNetwork
onIdntCmds: list[str]
onJoinCmds: list[str]
onStrtCmds: list[str]
markov: MarkovBot
2024-04-07 05:38:49 +00:00
def __init__(self, server: str): ...
2024-04-07 05:38:49 +00:00
def connect(self) -> None: ...
2024-04-07 05:38:49 +00:00
def join(self, chan: str, origin: str, lock: bool = True) -> None: ...
2024-04-07 05:38:49 +00:00
def ping(self, ircmsg: str) -> int: ...
2024-04-07 05:38:49 +00:00
def send(self, command: str) -> int: ...
2024-04-07 05:38:49 +00:00
def recv(self) -> bytes: ...
2024-04-07 05:38:49 +00:00
def log(self, message: str, level: str = "LOG") -> None: ...
2024-04-07 05:38:49 +00:00
def exit(self, message: str) -> NoReturn: ...
2024-04-07 05:38:49 +00:00
def msg(self, msg: str, target: str) -> None: ...
2024-04-07 05:38:49 +00:00
def op(self, name: str, chan: str) -> Union[int, None]: ...
2024-04-07 05:38:49 +00:00
def notice(self, msg: str, target: str, silent: bool = False) -> int: ...
2024-04-07 05:38:49 +00:00
def sendraw(self, command: str) -> int: ...
2024-04-07 05:38:49 +00:00
def mainloop(self) -> NoReturn: ...