File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ FUCK YEAH!
2+ HOORAH!
3+ HURRAY!
4+ OORAH!
5+ YAY!
6+ *\o/* CHEERS! *\o/*
7+ HOOHAH!
8+ HOOYAH!
9+ HUAH!
10+ ♪ ┏(°.°)┛ ┗(°.°)┓ ♬
Original file line number Diff line number Diff line change 11import random
22import re
3+ from pathlib import Path
34
45from cloudbot import hook
56
6- cheers = [
7- "FUCK YEAH!" ,
8- "HOORAH!" ,
9- "HURRAY!" ,
10- "OORAH!" ,
11- "YAY!" ,
12- "*\o/* CHEERS! *\o/*" ,
13- "HOOHAH!" ,
14- "HOOYAH!" ,
15- "HUAH!" ,
16- "♪ ┏(°.°)┛ ┗(°.°)┓ ♬" ,
17- ]
18-
197cheer_re = re .compile (r'\\o/' , re .IGNORECASE )
208
9+ cheers = []
10+
11+
12+ @hook .on_start
13+ def load_cheers (bot ):
14+ cheers .clear ()
15+ data_file = Path (bot .data_dir ) / "cheers.txt"
16+ with data_file .open (encoding = 'utf-8' ) as f :
17+ cheers .extend (line .strip () for line in f if not line .startswith ('//' ))
18+
2119
2220@hook .regex (cheer_re )
2321def cheer (chan , message ):
You can’t perform that action at this time.
0 commit comments