Fixed missing await, reported by ab3800 (props) and updated mirrors in README
This commit is contained in:
parent
02e393c469
commit
0fcd5b89ae
@ -45,5 +45,4 @@ Try it out, join **#superbowl** on *irc.supernets.org* now, we have beer!
|
|||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
###### Mirrors
|
###### Mirrors for this repository: [acid.vegas](https://git.acid.vegas/cancer) • [SuperNETs](https://git.supernets.org/acidvegas/cancer) • [GitHub](https://github.com/acidvegas/cancer) • [GitLab](https://gitlab.com/acidvegas/cancer) • [Codeberg](https://codeberg.org/acidvegas/cancer)
|
||||||
[acid.vegas](https://git.acid.vegas/cancer) • [GitHub](https://github.com/acidvegas/cancer) • [GitLab](https://gitlab.com/acidvegas/cancer) • [SuperNETs](https://git.supernets.org/acidvegas/cancer)
|
|
||||||
|
22
cancer.py
22
cancer.py
@ -29,16 +29,16 @@ import ssl
|
|||||||
import time
|
import time
|
||||||
|
|
||||||
# Connection
|
# Connection
|
||||||
server = 'irc.server.com'
|
server = 'irc.supernets.org'
|
||||||
port = 6697
|
port = 6697
|
||||||
use_ipv6 = False
|
use_ipv6 = False
|
||||||
use_ssl = True
|
use_ssl = True
|
||||||
vhost = None
|
vhost = None
|
||||||
channel = '#chats'
|
channel = '#dev'
|
||||||
key = None
|
key = None
|
||||||
|
|
||||||
# Identity
|
# Identity
|
||||||
nickname = 'CANCER'
|
nickname = '[DEV]CANCER'
|
||||||
username = 'smokesome'
|
username = 'smokesome'
|
||||||
realname = 'git.acid.vegas/cancer'
|
realname = 'git.acid.vegas/cancer'
|
||||||
|
|
||||||
@ -92,21 +92,21 @@ def ssl_ctx():
|
|||||||
return ctx
|
return ctx
|
||||||
|
|
||||||
class Generate: # degenerate *
|
class Generate: # degenerate *
|
||||||
def can(chan, target):
|
async def can(chan, target):
|
||||||
beer_choice = random.choice(['bud','modelo','ultra'])
|
beer_choice = random.choice(['bud','modelo','ultra'])
|
||||||
beer_temp = random.choice(['a piss warm','an ice cold','an empty'])
|
beer_temp = random.choice(['a piss warm','an ice cold','an empty'])
|
||||||
if beer_choice == 'bud':
|
if beer_choice == 'bud':
|
||||||
beer = '{0}{1}{2}'.format(color(' ', white, white), color(' BUD ', white, random.choice((blue,brown))), color('c', grey, white))
|
beer = '{0}{1}{2}'.format(color(' ', white, white), color(' BUD ', white, random.choice((blue,brown))), color('c', grey, white))
|
||||||
await self.action(chan, f'throws {color(target, white)} {temp} {beer} =)')
|
await Cancer.action(chan, f'throws {color(target, white)} {beer_temp} {beer} =)')
|
||||||
if luck(100):
|
if luck(100):
|
||||||
await asyncio.sleep(2)
|
await asyncio.sleep(2)
|
||||||
await self.action(chan, 'suddenly feels more gay...')
|
await Cancer.action(chan, 'suddenly feels more gay...')
|
||||||
elif beer_choice == 'modelo':
|
elif beer_choice == 'modelo':
|
||||||
beer = '{0}{1}{2}'.format(color(' ', orange, orange), color('Modelo', blue, yellow), color('c', grey, orange)) # props to opal
|
beer = '{0}{1}{2}'.format(color(' ', orange, orange), color('Modelo', blue, yellow), color('c', grey, orange)) # props to opal
|
||||||
await self.action(chan, f'throws {color(target, white)} {temp} {beer} =)')
|
await Cancer.action(chan, f'throws {color(target, white)} {beer_temp} {beer} =)')
|
||||||
elif beer_choice == 'modelo':
|
elif beer_choice == 'modelo':
|
||||||
beer = '{0}{1}'.format(color(' ULTRA ', blue, white), color('🬃', red, white)) # warm
|
beer = '{0}{1}'.format(color(' ULTRA ', blue, white), color('🬃', red, white)) # warm
|
||||||
await self.action(chan, f'throws {color(target, white)} {temp} {beer} =)')
|
await Cancer.action(chan, f'throws {color(target, white)} {beer_temp} {beer} =)')
|
||||||
|
|
||||||
def beer():
|
def beer():
|
||||||
glass = color(' ', light_grey, light_grey)
|
glass = color(' ', light_grey, light_grey)
|
||||||
@ -399,7 +399,7 @@ class Bot():
|
|||||||
target = nick
|
target = nick
|
||||||
elif len(args) == 2:
|
elif len(args) == 2:
|
||||||
target = args[1]
|
target = args[1]
|
||||||
Generate.can(chan, target)
|
await Generate.can(chan, target)
|
||||||
elif msg == '!chainsmoke' and not self.event:
|
elif msg == '!chainsmoke' and not self.event:
|
||||||
self.status = False
|
self.status = False
|
||||||
self.event = 'chainsmoke'
|
self.event = 'chainsmoke'
|
||||||
@ -456,7 +456,6 @@ class Bot():
|
|||||||
await self.raw(f'KILL {nick} CANCER KILLED {nick.upper()} - QUIT SMOKING TODAY! +1 800-QUIT-NOW')
|
await self.raw(f'KILL {nick} CANCER KILLED {nick.upper()} - QUIT SMOKING TODAY! +1 800-QUIT-NOW')
|
||||||
else:
|
else:
|
||||||
object = Generate.cigarette(self.stats['hits']) if msg == '!smoke' else Generate.joint(self.stats['hits'])
|
object = Generate.cigarette(self.stats['hits']) if msg == '!smoke' else Generate.joint(self.stats['hits'])
|
||||||
cigarette = Generate.cigarette(self.stats['hits'])
|
|
||||||
if self.fat:
|
if self.fat:
|
||||||
for i in range(3):
|
for i in range(3):
|
||||||
await self.sendmsg(chan, object)
|
await self.sendmsg(chan, object)
|
||||||
@ -470,4 +469,5 @@ class Bot():
|
|||||||
break
|
break
|
||||||
|
|
||||||
# Main
|
# Main
|
||||||
asyncio.run(Bot().connect())
|
Cancer = Bot()
|
||||||
|
asyncio.run(Cancer.connect())
|
||||||
|
Loading…
Reference in New Issue
Block a user