color example added

This commit is contained in:
Dionysus 2023-10-03 00:02:22 -04:00
parent b20e882809
commit 4af50c243c
Signed by: acidvegas
GPG Key ID: EF4B922DB85DC9DE

View File

@ -142,7 +142,7 @@ class Bot():
if target.startswith('#'): # Channel message if target.startswith('#'): # Channel message
if msg.startswith('!'): if msg.startswith('!'):
if msg == '!hello': if msg == '!hello':
self.sendmsg(chan, f'Hello {nick}!') self.sendmsg(chan, f'Hello {nick}! Do you like ' + color('colors?', green))
except (UnicodeDecodeError, UnicodeEncodeError): except (UnicodeDecodeError, UnicodeEncodeError):
pass # Some IRCds allow invalid UTF-8 characters, this is a very important exception to catch pass # Some IRCds allow invalid UTF-8 characters, this is a very important exception to catch
except Exception as ex: except Exception as ex: