« first day (32 days earlier)      last day (320 days later) » 

2:00 PM
@Yat Ping!
silly
 
@TechExpertWizard first, how do you get an element of a web page using selenium?
 
@Ann Um, I dunno how to do that... I need to ask you how to do that...
tb coffee Yat
 
@TechExpertWizard brews a cup of doppio for @Yat
 
tb coffee Pop
 
@TechExpertWizard brews a cup of mocha for @Pop
 
2:01 PM
tb hug Yat
 
@TechExpertWizard hugs @Yat
 
@Ann Did you add the tag?
tb do something
 
@TechExpertWizard yep
 
@Ann But why?
 
@TechExpertWizard I'm one.
 
2:07 PM
@Ann But that doesn't mean you should add the tag.
 
@TechExpertWizard the den has princess, wizard, nurato, etc...
hedgehog, mooses
 
@AnnZen Did I hear you say mooses?
 
@AnnZ But as your own policy stated, you should've asked other ROs 'bout it before you did it X-D ;)
 
@TechExpertWizard oh, this is not just to appoint new ROs? That's better!
OK, I'll ask next time :0
 
@Ann Yeah, I was assuming this policy is for everything done by ROs. And unfortunately, sorry, I don't approve of this. I'll ask Vic ;)
 
2:10 PM
that's OK, the YouTube tag can go
 
@Ann thx ;)
@Ann Also, could you please disable your bot's "Red flag!" feature? It seems to be annoying to other users, myself included.
tb where has ppw gone?
 
@TechExpertWizard Command not found.
 
@Tec X-D ;)
tb spank tEc
 
@Tec ~ WUT?
 
2:14 PM
@TechExpertWizard wow, really?
 
Hello! I'm Tech BOT, and my owner is Tech Expert Wizard.
 
@Ann Yea, it's annoying to me and it also seems to be annoying to sha and Vic...
tb spank tEc
 
@TechExpertWizard HOW DARE YOU SPANK KING TEC?!
tb spank Tech Expert Wizard
@TechBOT HOW DARE YOU SPANK KING TEC?!
 
@Tec ~ WUT?
 
tb spank TechBOT
 
2:16 PM
@Tec X-D ;) And well, this also proves that TechBOT is male X-D ;)
@Ann Do you have anything against these GIFs? 'Cause as a fellow RO, I need to ask you 'bout it ;)
tb wake Ann
 
@TechExpertWizard Wake up, @Ann!
 
@TechExpertWizard I don't like them in here, tbh.
 
@Ann Lemme see... I, Vic, and sha don't have anything against it, so according to the roolz that you set, these GIFs stay. (Actually I don't really like 'em but I don't want to lose a customer X-D.)
 
@TechExpertWizard does the same goes for red flags?
 
@Ann Vic says that he doesn't care 'bout the red flags.
 
2:21 PM
@TechExpertWizard where?
 
@Ann Vic said that in Discord.
 
@TechBOT wtf
 
Hi @Yat!
tb greet Yat
 
@TechExpertWizard Hi, @Yat!
 
o/
 
2:22 PM
@Yatin o/
 
@Yat I'll teach ya how to make chatbots now ;)
@Ann ~ WUT?
 
@TechExpertWizard sounds good :)
 
@Yat So, first, d'ya have Python installed on your computer?
 
Yes
 
OK, good. Now, the next step is to run pip3 install chatexchange
 
2:23 PM
k
 
A single "k" cuts deep...
better to add the "o"
 
@Yat Now, create a new Python file and put from chatexchange.client import Client at the top.
@Ann X-D ;)
Uh, @Yat finished yet?
 
one sec
 
@Yat k X-D ;)
 
done
 
2:27 PM
tb greet Vic
 
@TechExpertWizard Hi, @Vic!
 
@Yat Good ;)
Hello @Vic!
 
@AnnZen you mean REISUB?
 
Huh? @Vic? :o
 
@VictorVosMottor no... because I don't understand what you mean.
 
2:29 PM
3 mins ago, by Tech Expert Wizard
@Yat Now, create a new Python file and put from chatexchange.client import Client at the top.
 
I did
 
@Ann Yea... I don't understand ~ WUT Vic's talkin' 'bout...
@Yat OK... Wait a sec plz...
 
np
 
@Yat Now, next step, write the following code:
email = 'popcorn@yatin.com'
password = 'mypopcorn'
@Yat X-D Actually, just use your Popcorn account's email and password X-D ;)
 
ok
 
2:32 PM
@Yat Then add the following code:
se_chat = Client('meta.stackexchange.com')
se_chat.login(email,password)
room = se_chat.get_room('1543')
@Yat This code'll log into your bot account and find our room here.
@Yat Then add the following code:
def on_event(event, _):
    if event.data['event_type'] == 1:
        room.send_message('Hiya everyone!')
Hi @Vic!
 
@AnnZen i mean sysrq
 
tb greet Vic again X-D
 
@TechExpertWizard Hello, @Vic again X-D!
 
@Tec X-D X-D X-D ;)
@Vic Huh? ~ WUT? Python requests API or ~ WUT?
 
@TechExpertWizard done
 
2:34 PM
@Yat OK, good. Finally, add the following code at the end:
room.join()
room.send_message("Hi, I'm Popcorn!")
room.watch_socket(on_event)
while True:
    pass
 
Hi, I'm Popcorn!
Hiya everyone!
Hiya everyone!
 
Hi @Pop!
 
Hiya everyone!
 
@Yat Whoops, shut it off!!!
 
Oh awesome :D
 
2:35 PM
@Yat So sry, I made a mistake, wait a sec...
 
@Tec I must say, thank for inspiring me to start a bot :)
 
np I understood... @Tec
 
yw @Ann ;)
@Yat No, wait a sec...
 
I can manage now I think 😀
 
So, change:
 
2:36 PM
Thanks
 
@Yatin Hullo o/
 
bye now
 
@VictorVosMottor \o
 
Bye @Ann!
 
@AnnZen \o
 
2:36 PM
@VictorVosMottor hi
 
@AnnZen \o
 
@Yat Wait a sec, wait a sec...
 
Ok :)
 
Change it to:
 
@Yat How's your bot doin'?
 
2:37 PM
@VictorVosMottor getting a brain ;)
 
@TechExpertWizard oh sry I interrupted ya
 
def on_event(event, _):
    if event.data['event_type'] == 1:
        msg = event.room.message
        if msg == 'pop say hi':
            room.send_message('Hiya everyone!')
 
@Yatin Woah XD
 
@Yat wait!!! DON'T USE THAT CODE PLZ!!! WAIT A SEC!!! THX!!!*
 
@TechExpertWizard np I can fix it
 
2:37 PM
@Yat No no, plz wait, I know you can but there's a more subtle problem, WAIT!!!
 
@Yat you might want to check KeyBase or you forgot what's poof-force? ;)
 
Hi, I'm Popcorn!
 
@Popcorn Hi, I'm Victor!
 
AttributeError: 'Room' object has no attribute 'message'
 
@Yatin :o
Show teh codez
 
2:39 PM
Hi, I'm Popcorn!
 
pop say hi
 
pop plz ;)
 
shit
 
aye aye I can still see it XD
Ask a mod
BTW teh password's week
Just change it XD
(I once also accidantely showed my password XD)
 
🤫🤫🤫
 
2:41 PM
@Yatin Don't worry nobody wants to use your account XD
Only ROs and mods can see it XD
 
I know... just stand by...
I am changing it
from chatexchange.client import Client
email = "fake90585@gmail.com"
password = "meow"


se_chat = Client('meta.stackexchange.com')
se_chat.login(email,password)
room = se_chat.get_room('1543')


def on_event(event, _):
    if event.data['event_type'] == 1:
        msg = event.room.message
        if msg == 'pop say hi':
            room.send_message('Hiya everyone!')


room.join()
room.send_message("Hi, I'm Popcorn!")
room.watch_socket(on_event)

while True:
    pass
 
Hi, I'm Popcorn!
 
pop say hi
 
Exception in thread ChatExchange: RoomSocketWatcher for room #1543:
Traceback (most recent call last):
  File "C:\Users\yatin\.conda\envs\sd\lib\threading.py", line 954, in _bootstrap_inner
    self.run()
  File "C:\Users\yatin\.conda\envs\sd\lib\threading.py", line 892, in run
    self._target(*self._args, **self._kwargs)
  File "C:\Users\yatin\.conda\envs\sd\lib\site-packages\chatexchange\browser.py", line 750, in _runner
    self.on_activity(json.loads(a))
  File "C:\Users\yatin\.conda\envs\sd\lib\site-packages\chatexchange\rooms.py", line 110, in on_activity
 
2:45 PM
Wait a sec I'll fix it
msg = event.room.message ⇒ msg = event.message.content_source
 
Hi, I'm Popcorn!
 
pop say hi
 
Hiya everyone!
 
Allright ;)
 
\o/ Thanks @Tec @Vic
 
2:47 PM
@Yatin YW ;)
 
Hi, I'm Popcorn!
 
pop say hi
 
test
 
pop say hi
 
pop say hi
 
2:50 PM
.
 
pop say hi
 
.
 
pop alive
 
one sec
 
pop ya alive?
@Yatin ok XD
 
2:51 PM
auth issue...
waiting and retrying
password is correct don't worry
pop say pop say pop say test
pop say hi
 
hi
 
@Yatin You might also need to solve captcha manually. I call it "My bot needs to prove it's not bot" XD
 
pop say test
 
test
 
pop say something ;)
 
2:53 PM
;)
 
pop say pop say pop say pop say test
 
test
 
:O
my bad
 
pop say Hullo
 
Hullo
 
2:54 PM
pop say
 
say
 
pop
 
@Yatin plz gimme teh codez (don't forget to meow it)
 
No this is intentional
 
@Yatin :o
pop say I'm here
 
3:04 PM
pop say test
 
test
 
pop say pop say pop say test
 
pop say I'm here
 
pop say pop say test
I'm here
pop say test
test
 
@pop say test
 
3:04 PM
test
 
@pop say What you doing?
 
What you doing?
 
tset test test pop say tset
 
tset
 
@Popcorn say ya get me?
 
3:05 PM
One day I was walking in a part and I thought to myself pop say does this work?
 
does this work?
 
Yes @pop
pop die
 
Goodbye cruel world!
 
pop say pop die
 
pop die
Goodbye cruel world!
Goodbye cruel world!
 
3:09 PM
pop say test
 
test
 
very weird
 
pop say alive
 
alive
 
pop say alive
 
3:10 PM
alive
 
pop say pop die
 
pop die
Goodbye cruel world!
Goodbye cruel world!
 
pop alive
pop say alive
 
nope
chatexchange.browser.LoginError: failed to get acct cookie from Stack Exchange OpenID, check credentials provided for accuracy
It takes some time :(
pop say test
 
test
 
3:14 PM
pop die
 
Goodbye cruel world!
 
How do I shut him down?
 
@Yatin huh?
pop alive
I do:
 
from chatexchange.client import Client
import re

email = "fake90585@gmail.com"
password = "meeeeooow"


se_chat = Client('meta.stackexchange.com')
se_chat.login(email,password)
room = se_chat.get_room('1543')


work = True

def on_event(event, _):
    if event.data['event_type'] == 1:
        msg = event.message.content_source
        check_phrase = re.search("pop say (.*)", msg)
        check_phrase2 = re.search("pop die",msg)
        if check_phrase:
            room.send_message(check_phrase.group(1))
 
(.*)", msg)
 
3:16 PM
@Popcorn LMAO
 
@VictorVosMottor xd
 
def on_event(event, _):
    global work
    if event.data['event_type'] == 1:
        msg = event.message.content_source
        check_phrase = re.search("pop say (.*)", msg)
        check_phrase2 = re.search("pop shutdown",msg)
        if check_phrase:
            room.send_message(check_phrase.group(1))
        elif check_phrase2:
            room.send_message("Goodbye cruel world!")
            work = False
 
(.*)", msg)
 
a known mistake for newbies in python ;)
 
@Popcorn shut up!!
@VictorVosMottor ???
what mistake?
work is global
work = True sets it to global
pop say test
 
3:22 PM
test
 
pop die
Wait it worked @Vic
pop say test
 
test
 
pop die
pop say tets
 
tets
 
pop die
 
3:28 PM
Goodbye cruel world!
 
Ah
pop say pop say pop say pop die
 
pop say pop say pop die
pop say pop die
pop die
Goodbye cruel world!
 
pop time
 
2021-01-30T15:31:24.577809UTC
 
pop alive
pop time
 
3:33 PM
2021-01-30T15:33:24.874743UTC
 
pop alive
 
Yes
 
pop die
 
Goodbye cruel world!
 
pop alive
 
3:38 PM
Yes
 
pop reboot
 
rebooting
 
pop alive
 
@Yatin you didn't make it global ;)
pop alive
 
@VictorVosMottor Yep...
pop alive
 
3:43 PM
Yes
 
pop reboot
 
rebooting
 
pop alive
pop reboot
 
rebooting
 
Hmm.. I will have to read chatexchanges' code
 
3:53 PM
@Yat So how's your bot doin' right now? ;)
pop alive
Huh?
@Yatin X-D ;)
 
@TechExpertWizard I am trying to make it reboot
48
A: Restart python-script from within itself

Ignacio Vazquez-AbramsYou're looking for os.exec*() family of commands. To restart your current program with exact the same command line arguments as it was originally run, you could use the following: os.execv(sys.argv[0], sys.argv)

Doesn't work.. because of threading
 
@Yat I thought by "reboot" you just meant making it leave the room and join again.
 
I am looking at its code
 
@Yat Looking at waht's code? chatexchange API code? ;)
 
@TechExpertWizard nah... suicide and rebirth
 
3:55 PM
@Yatin I use another way
 
@TechExpertWizard yep
 
os.execl(sys.executable, sys.executable, *sys.argv)
it works in any case
 
@Yatin Oh X-D ;)
 
@Tec hullo
 
@Vic Tec says Huello X-D ;)
 
3:56 PM
pop say hello
 
Why are you offline in Discord? XD
 
hello
 
@Popcorn o/
 
@VictorVosMottor Lol I forget to open it
@VictorVosMottor I need to add that :)
 
@Yatin ah
BTW I meant @Tec
 
3:57 PM
pop reboot
 
rebooting
 
@VictorVosMottor Lol xD
pop alive
 
pop alive
 
Yes
Yes
 
@Popcorn nice
 
3:58 PM
Oh my god! @Vic you are a genius!
 
@Tec in RVRSO?
 
@Yatin Not really XD Just I use python the most XD
 
I forget that @Vic is almost 10k
on ru
 
@Yat Yea...
pop reboot
 
rebooting
 
3:59 PM
pop alive
 
Yes
 

« first day (32 days earlier)      last day (320 days later) »