2023-11-09 21:24:03 +00:00
|
|
|
#!/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
|
2024-05-10 03:50:22 +00:00
|
|
|
from markov import MarkovBot
|
2023-11-09 21:37:08 +00:00
|
|
|
|
2023-11-09 21:24:03 +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: ...
|
2023-11-09 21:24:03 +00:00
|
|
|
|
|
|
|
|
|
|
|
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]
|
2023-11-09 21:24:03 +00:00
|
|
|
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
|
2024-02-20 22:51:04 +00:00
|
|
|
ignores: list[str]
|
2024-03-06 18:33:04 +00:00
|
|
|
threads: list[str]
|
|
|
|
lastfmLink: LastFMNetwork
|
2024-04-20 07:47:00 +00:00
|
|
|
onIdntCmds: list[str]
|
|
|
|
onJoinCmds: list[str]
|
|
|
|
onStrtCmds: list[str]
|
2024-05-10 03:50:22 +00:00
|
|
|
markov: MarkovBot
|
2024-05-11 00:43:14 +00:00
|
|
|
autoMethod: str
|
2024-05-18 22:38:49 +00:00
|
|
|
dnsblMode: str
|
2024-05-23 14:04:41 +00:00
|
|
|
statuses: dict[str, dict[str, str]]
|
|
|
|
ops: dict[str, bool]
|
2024-06-10 09:20:45 +00:00
|
|
|
dns: dict[str, dict[str, Union[str, list[str]]]]
|
2023-11-09 21:24:03 +00:00
|
|
|
|
2024-04-07 05:38:49 +00:00
|
|
|
def __init__(self, server: str): ...
|
2023-11-09 21:24:03 +00:00
|
|
|
|
2024-04-07 05:38:49 +00:00
|
|
|
def connect(self) -> None: ...
|
2023-11-09 21:24:03 +00:00
|
|
|
|
2024-04-07 05:38:49 +00:00
|
|
|
def join(self, chan: str, origin: str, lock: bool = True) -> None: ...
|
2023-11-09 21:24:03 +00:00
|
|
|
|
2024-04-07 05:38:49 +00:00
|
|
|
def ping(self, ircmsg: str) -> int: ...
|
2023-11-09 21:24:03 +00:00
|
|
|
|
2024-04-07 05:38:49 +00:00
|
|
|
def send(self, command: str) -> int: ...
|
2023-11-09 21:24:03 +00:00
|
|
|
|
2024-04-07 05:38:49 +00:00
|
|
|
def recv(self) -> bytes: ...
|
2023-11-09 21:24:03 +00:00
|
|
|
|
2024-04-07 05:38:49 +00:00
|
|
|
def log(self, message: str, level: str = "LOG") -> None: ...
|
2023-11-09 21:24:03 +00:00
|
|
|
|
2024-04-07 05:38:49 +00:00
|
|
|
def exit(self, message: str) -> NoReturn: ...
|
2023-11-09 21:24:03 +00:00
|
|
|
|
2024-04-07 05:38:49 +00:00
|
|
|
def msg(self, msg: str, target: str) -> None: ...
|
2023-11-09 21:24:03 +00:00
|
|
|
|
2024-04-07 05:38:49 +00:00
|
|
|
def op(self, name: str, chan: str) -> Union[int, None]: ...
|
2023-11-09 21:24:03 +00:00
|
|
|
|
2024-04-07 05:38:49 +00:00
|
|
|
def notice(self, msg: str, target: str, silent: bool = False) -> int: ...
|
2023-11-09 21:24:03 +00:00
|
|
|
|
2024-04-07 05:38:49 +00:00
|
|
|
def sendraw(self, command: str) -> int: ...
|
2023-11-09 21:24:03 +00:00
|
|
|
|
2024-04-07 05:38:49 +00:00
|
|
|
def mainloop(self) -> NoReturn: ...
|