color example added
This commit is contained in:
parent
b20e882809
commit
4af50c243c
@ -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:
|
||||||
|
Loading…
Reference in New Issue
Block a user