cancer

- bad habits for internet relay chat
git clone git://git.acid.vegas/cancer.git
Log | Files | Refs | Archive | README | LICENSE

commit 02e393c4691f8c1599111944d974ce744e968461
parent b2c0bbed37e8ebbbbc601930d2881e3ae3eb6451
Author: acidvegas <acid.vegas@acid.vegas>
Date: Sat, 16 Sep 2023 18:25:13 -0400

Added can generator and ULTRA beers

Diffstat:
Mcancer.py | 25+++++++++++++++++--------

1 file changed, 17 insertions(+), 8 deletions(-)

diff --git a/cancer.py b/cancer.py
@@ -92,6 +92,22 @@ def ssl_ctx():
 	return ctx
 
 class Generate: # degenerate *
+	def can(chan, target):
+		beer_choice = random.choice(['bud','modelo','ultra'])
+		beer_temp   = random.choice(['a piss warm','an ice cold','an empty'])
+		if beer_choice == 'bud':
+			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} =)')
+			if luck(100):
+				await asyncio.sleep(2)
+				await self.action(chan, 'suddenly feels more gay...')
+		elif beer_choice == 'modelo':
+			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} =)')
+		elif beer_choice == 'modelo':
+			beer = '{0}{1}'.format(color(' ULTRA ', blue, white), color('🬃', red, white)) # warm
+			await self.action(chan, f'throws {color(target, white)} {temp} {beer} =)')
+
 	def beer():
 		glass = color(' ', light_grey, light_grey)
 		return glass + color(''.join(random.choice(('       :.')) for _ in range(9)), orange, yellow) + glass
@@ -383,14 +399,7 @@ class Bot():
 									target = nick
 								elif len(args) == 2:
 									target = args[1]
-								if random.choice([1,2]) == 1:
-									beer = '{0}{1}{2}'.format(color(' ', orange, orange), color('Modelo', blue, yellow), color('c', grey, orange)) # props to opal
-								else:
-									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)} an ice cold {beer} =)')
-								if luck(100):
-									await asyncio.sleep(2)
-									await self.action(chan, 'suddenly feels more gay...')
+								Generate.can(chan, target)
 							elif msg == '!chainsmoke' and not self.event:
 								self.status = False
 								self.event  = 'chainsmoke'