mirror of
https://gitlab.com/oloturia/damastodon.git
synced 2025-01-07 22:17:15 +01:00
Merge branch 'master' into 'main'
Master See merge request oloturia/damastodon!6
This commit is contained in:
commit
f60bd01443
1 changed files with 4 additions and 4 deletions
|
@ -15,8 +15,8 @@ save_position = "/tmp/"
|
||||||
CLEANR = re.compile('<.*?>')
|
CLEANR = re.compile('<.*?>')
|
||||||
botname = "@damastodon "
|
botname = "@damastodon "
|
||||||
|
|
||||||
firow = "🔠1️⃣ 2️⃣ 3️⃣ 4️⃣ 5️⃣ 6️⃣ 7️⃣ 8️⃣\n"
|
firow = "🇻1️⃣ 2️⃣ 3️⃣ 4️⃣ 5️⃣ 6️⃣ 7️⃣ 8️⃣\n"
|
||||||
colsx = "🇦 🇧 🇨 🇩 🇪 🇫 🇬 🇭 "
|
colsx = "🇦🇧🇨🇩🇪🇫🇬🇭"
|
||||||
|
|
||||||
def cleanHTML(raw):
|
def cleanHTML(raw):
|
||||||
cleanText = re.sub(CLEANR, '',raw)
|
cleanText = re.sub(CLEANR, '',raw)
|
||||||
|
@ -56,7 +56,7 @@ def check_message(notification):
|
||||||
try:
|
try:
|
||||||
challenger = notification["status"]["mentions"][1]["acct"]
|
challenger = notification["status"]["mentions"][1]["acct"]
|
||||||
except:
|
except:
|
||||||
mastodon.status_post("Hello @"+account+" \n your request is not valid")
|
mastodon.status_post("Hello @"+account+" \n your request is not valid",visibility="direct")
|
||||||
return
|
return
|
||||||
os.symlink(save_position+challenger,save_position+account)
|
os.symlink(save_position+challenger,save_position+account)
|
||||||
board = dama.init_board()
|
board = dama.init_board()
|
||||||
|
@ -83,7 +83,7 @@ def check_message(notification):
|
||||||
if content.lower() == "quit":
|
if content.lower() == "quit":
|
||||||
os.remove(save_position+black[1:])
|
os.remove(save_position+black[1:])
|
||||||
os.remove(save_position+white[1:])
|
os.remove(save_position+white[1:])
|
||||||
mastodon.status_post(black+" "+white+" the match was cancelled.")
|
mastodon.status_post(black+" "+white+" the match was cancelled.",visibility="direct")
|
||||||
return
|
return
|
||||||
if (black == "@"+account and turn == 1) or (white == "@"+account and turn == 0):
|
if (black == "@"+account and turn == 1) or (white == "@"+account and turn == 0):
|
||||||
board = dama.valid_move(content.lower(),turn,board,inversion=True)
|
board = dama.valid_move(content.lower(),turn,board,inversion=True)
|
||||||
|
|
Loading…
Reference in a new issue