Add target
typehint on IRCServer.send_tagmsg, add send_tagmsg to IRCChannel/IRCUser
This commit is contained in:
parent
9d72cbca73
commit
8b54046ca4
3 changed files with 6 additions and 1 deletions
|
@ -131,6 +131,9 @@ class Channel(IRCObject.Object):
|
|||
self.server.send_message(self.name, text, tags=tags)
|
||||
def send_notice(self, text: str, tags: dict={}):
|
||||
self.server.send_notice(self.name, text, tags=tags)
|
||||
def send_tagmsg(self, tags: dict):
|
||||
self.server.send_tagmsg(self.name, tags)
|
||||
|
||||
def send_mode(self, mode: str=None, target: typing.List[str]=None):
|
||||
self.server.send_mode(self.name, mode, target)
|
||||
def send_kick(self, target: str, reason: str=None):
|
||||
|
|
|
@ -326,7 +326,7 @@ class Server(IRCObject.Object):
|
|||
) -> IRCLine.Line:
|
||||
return self.send(utils.irc.protocol.notice(target, message, tags))
|
||||
|
||||
def send_tagmsg(self, target, tags: dict):
|
||||
def send_tagmsg(self, target: str, tags: dict):
|
||||
return self.send(utils.irc.protocol.tagmsg(target, tags))
|
||||
|
||||
def send_mode(self, target: str, mode: str=None, args: typing.List[str]=None
|
||||
|
|
|
@ -73,3 +73,5 @@ class User(IRCObject.Object):
|
|||
self.server.send_notice(self.nickname, text, tags=tags)
|
||||
def send_ctcp_response(self, command: str, args: str):
|
||||
self.send_notice("\x01%s %s\x01" % (command, args))
|
||||
def send_tagmsg(self, tags: dict):
|
||||
self.server.send_tagmsg(self.nickname, tags)
|
||||
|
|
Loading…
Reference in a new issue