RE: Chatango Bot Tutorial 01-06-2014, 12:02 PM
#18
(01-06-2014, 11:57 AM)Anizeb Wrote: Yes, yes, that's all well and good for normal messages.
But in the PMs, neither HTML nor the normal font change method will work.
I know it's possible, I just never learned how to do it.
Like when a bot PMs someone?
I myself can't exactly say. Maybe we should work on creating our own way : P
So here's the breakdown of the idea.
Code:
def onInit(self):
self.setNameColor("FFFFFF")
self.setFontColor("FFFFFF")
self.setFontFace("Ariel")
self.setFontSize(11)Basically the idea under my belt is to use an "if-else" statement.
Code:
def onInit(self):
if self.pm.message:
self.setNameColor("FFFFFF")
self.setFontColor("FFFFFF")
self.setFontFace("Ariel")
self.setFontSize(11)
else:
self.setNameColor("FFFFFF")
self.setFontColor("FFFFFF")
self.setFontFace("Ariel")
self.setFontSize(9)That probably won't work, looking at it twice. I can't say for sure though. It's an idea from five seconds. I haven't tested it so... ye.
(This post was last modified: 01-06-2014, 12:25 PM by Equinox.)
![[Image: BXqGARG.png]](https://i.imgur.com/BXqGARG.png)










![[+]](https://sinister.li/images/modern/collapse_collapsed.png)