Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import socket
- from config import HOST, PORT, CHANNEL
- # User Info
- USER = "straussbot" # The bots username
- PASS = "oauth:sj175lp884ji5c9las089sm9vvaklf" # The auth code
- class StraussBot:
- def __init__(self):
- self.Ssock = socket.socket()
- def connectSock(self):
- self.Ssock.connect((HOST, PORT))
- self.Ssock.send(str("Pass " + PASS + "rn").encode('UTF-8'))
- self.Ssock.send(str("NICK " + USER + "rn").encode('UTF-8'))
- self.Ssock.send(str("JOIN " + CHANNEL + "rn").encode('UTF-8'))
- if __name__ == "__main__":
- print "Starting the bot..."
- while True:
- straussbot = StraussBot
- try:
- straussbot.connectSock()
- except Exception as e:
- print e
- straussbot = StraussBot
- straussbot = StraussBot()
- straussbot = StraussBot
- straussbot = StraussBot()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement