Telegram User Bot that plays uno with mau_mau_bot
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

207 lines
9.4 KiB

#!/usr/bin/env python3
# -*- coding: utf-8 -*-
RED = 'r'
BLUE = 'b'
GREEN = 'g'
YELLOW = 'y'
COLORS = (RED, BLUE, GREEN, YELLOW)
# Special cards
CHOOSE = 'colorchooser'
DRAW_FOUR = 'draw_four'
SPECIALS = (CHOOSE, DRAW_FOUR)
# those stickers below are only used for grey cards.
# NOGREY is not used now
# can't be used for userbot
NOGREY = {
'BQADBAAD-AIAAl9XmQABxEjEcFM-VHIC': 'option_draw',
'BQADBAAD-gIAAl9XmQABcEkAAbaZ4SicAg': 'option_pass',
'BQADBAADygIAAl9XmQABJoLfB9ntI2UC': 'option_bluff',
'BQADBAADxAIAAl9XmQABC5v3Z77VLfEC': 'option_info'
}
# STICKERS is not used now
# can't be used for userbot
STICKERS = {
'BQADBAAD2QEAAl9XmQAB--inQsYcLTsC': 'b_0',
'BQADBAAD2wEAAl9XmQABBzh4U-rFicEC': 'b_1',
'BQADBAAD3QEAAl9XmQABo3l6TT0MzKwC': 'b_2',
'BQADBAAD3wEAAl9XmQAB2y-3TSapRtIC': 'b_3',
'BQADBAAD4QEAAl9XmQABT6nhOuolqKYC': 'b_4',
'BQADBAAD4wEAAl9XmQABwRfmekGnpn0C': 'b_5',
'BQADBAAD5QEAAl9XmQABQITgUsEsqxsC': 'b_6',
'BQADBAAD5wEAAl9XmQABVhPF6EcfWjEC': 'b_7',
'BQADBAAD6QEAAl9XmQABP6baig0pIvYC': 'b_8',
'BQADBAAD6wEAAl9XmQAB0CQdsQs_pXIC': 'b_9',
'BQADBAAD7QEAAl9XmQAB00Wii7R3gDUC': 'b_draw',
'BQADBAAD8QEAAl9XmQAB_RJHYKqlc-wC': 'b_skip',
'BQADBAAD7wEAAl9XmQABo7D0B9NUPmYC': 'b_reverse',
'BQADBAAD9wEAAl9XmQABb8CaxxsQ-Y8C': 'g_0',
'BQADBAAD-QEAAl9XmQAB9B6ti_j6UB0C': 'g_1',
'BQADBAAD-wEAAl9XmQABYpLjOzbRz8EC': 'g_2',
'BQADBAAD_QEAAl9XmQABKvc2ZCiY-D8C': 'g_3',
'BQADBAAD_wEAAl9XmQABJB52wzPdHssC': 'g_4',
'BQADBAADAQIAAl9XmQABp_Ep1I4GA2cC': 'g_5',
'BQADBAADAwIAAl9XmQABaaMxxa4MihwC': 'g_6',
'BQADBAADBQIAAl9XmQABv5Q264Crz8gC': 'g_7',
'BQADBAADBwIAAl9XmQABjMH-X9UHh8sC': 'g_8',
'BQADBAADCQIAAl9XmQAB26fZ2fW7vM0C': 'g_9',
'BQADBAADCwIAAl9XmQAB64jIZrgXrQUC': 'g_draw',
'BQADBAADDwIAAl9XmQAB17yhhnh46VQC': 'g_skip',
'BQADBAADDQIAAl9XmQAB_xcaab0DkegC': 'g_reverse',
'BQADBAADEQIAAl9XmQABiUfr1hz-zT8C': 'r_0',
'BQADBAADEwIAAl9XmQAB5bWfwJGs6Q0C': 'r_1',
'BQADBAADFQIAAl9XmQABHR4mg9Ifjw0C': 'r_2',
'BQADBAADFwIAAl9XmQABYBx5O_PG2QIC': 'r_3',
'BQADBAADGQIAAl9XmQABTQpGrlvet3cC': 'r_4',
'BQADBAADGwIAAl9XmQABbdLt4gdntBQC': 'r_5',
'BQADBAADHQIAAl9XmQABqEI274p3lSoC': 'r_6',
'BQADBAADHwIAAl9XmQABCw8u67Q4EK4C': 'r_7',
'BQADBAADIQIAAl9XmQAB8iDJmLxp8ogC': 'r_8',
'BQADBAADIwIAAl9XmQAB_HCAww1kNGYC': 'r_9',
'BQADBAADJQIAAl9XmQABuz0OZ4l3k6MC': 'r_draw',
'BQADBAADKQIAAl9XmQAC2AL5Ok_ULwI': 'r_skip',
'BQADBAADJwIAAl9XmQABu2tIeQTpDvUC': 'r_reverse',
'BQADBAADKwIAAl9XmQAB_nWoNKe8DOQC': 'y_0',
'BQADBAADLQIAAl9XmQABVprAGUDKgOQC': 'y_1',
'BQADBAADLwIAAl9XmQABqyT4_YTm54EC': 'y_2',
'BQADBAADMQIAAl9XmQABGC-Xxg_N6fIC': 'y_3',
'BQADBAADMwIAAl9XmQABbc-ZGL8kApAC': 'y_4',
'BQADBAADNQIAAl9XmQAB67QJZIF6XAcC': 'y_5',
'BQADBAADNwIAAl9XmQABJg_7XXoITsoC': 'y_6',
'BQADBAADOQIAAl9XmQABVrd7OcS2k34C': 'y_7',
'BQADBAADOwIAAl9XmQABRpJSahBWk3EC': 'y_8',
'BQADBAADPQIAAl9XmQAB9MwJWKLJogYC': 'y_9',
'BQADBAADPwIAAl9XmQABaPYK8oYg84cC': 'y_draw',
'BQADBAADQwIAAl9XmQABO_AZKtxY6IMC': 'y_skip',
'BQADBAADQQIAAl9XmQABZdQFahGG6UQC': 'y_reverse',
'BQADBAAD9QEAAl9XmQABVlkSNfhn76cC': 'draw_four',
'BQADBAAD8wEAAl9XmQABl9rUOPqx4E4C': 'colorchooser',
'BQADBAAD-AIAAl9XmQABxEjEcFM-VHIC': 'option_draw',
'BQADBAAD-gIAAl9XmQABcEkAAbaZ4SicAg': 'option_pass',
'BQADBAADygIAAl9XmQABJoLfB9ntI2UC': 'option_bluff',
'BQADBAADxAIAAl9XmQABC5v3Z77VLfEC': 'option_info'
}
# can't be used for userbot
STICKERS_GREY = {
'BQADBAADRQIAAl9XmQAB1IfkQ5xAiK4C': 'b_0',
'BQADBAADRwIAAl9XmQABbWvhTeKBii4C': 'b_1',
'BQADBAADSQIAAl9XmQABS1djHgyQokMC': 'b_2',
'BQADBAADSwIAAl9XmQABwQ6VTbgY-MIC': 'b_3',
'BQADBAADTQIAAl9XmQABAlKUYha8YccC': 'b_4',
'BQADBAADTwIAAl9XmQABMvx8xVDnhUEC': 'b_5',
'BQADBAADUQIAAl9XmQABDEbhP1Zd31kC': 'b_6',
'BQADBAADUwIAAl9XmQABXb5XQBBaAnIC': 'b_7',
'BQADBAADVQIAAl9XmQABgL5HRDLvrjgC': 'b_8',
'BQADBAADVwIAAl9XmQABtO3XDQWZLtYC': 'b_9',
'BQADBAADWQIAAl9XmQAB2kk__6_2IhMC': 'b_draw',
'BQADBAADXQIAAl9XmQABEGJI6CaH3vcC': 'b_skip',
'BQADBAADWwIAAl9XmQAB_kZA6UdHXU8C': 'b_reverse',
'BQADBAADYwIAAl9XmQABGD5a9oG7Yg4C': 'g_0',
'BQADBAADZQIAAl9XmQABqwABZHAXZIg0Ag': 'g_1',
'BQADBAADZwIAAl9XmQABTI3mrEhojRkC': 'g_2',
'BQADBAADaQIAAl9XmQABVi3rUyzWS3YC': 'g_3',
'BQADBAADawIAAl9XmQABZIf5ThaXnpUC': 'g_4',
'BQADBAADbQIAAl9XmQABNndVJSQCenIC': 'g_5',
'BQADBAADbwIAAl9XmQABpoy1c4ZkrvwC': 'g_6',
'BQADBAADcQIAAl9XmQABDeaT5fzxwREC': 'g_7',
'BQADBAADcwIAAl9XmQABLIQ06ZM5NnAC': 'g_8',
'BQADBAADdQIAAl9XmQABel-mC7eXGsMC': 'g_9',
'BQADBAADdwIAAl9XmQABOHEpxSztCf8C': 'g_draw',
'BQADBAADewIAAl9XmQABDaQdMxjjPsoC': 'g_skip',
'BQADBAADeQIAAl9XmQABek1lGz7SJNAC': 'g_reverse',
'BQADBAADfQIAAl9XmQABWrxoiXcsg0EC': 'r_0',
'BQADBAADfwIAAl9XmQABlav-bkgSgRcC': 'r_1',
'BQADBAADgQIAAl9XmQABDjZkqfJ4AdAC': 'r_2',
'BQADBAADgwIAAl9XmQABT7lH7VVcy3MC': 'r_3',
'BQADBAADhQIAAl9XmQAB1arPC5x0LrwC': 'r_4',
'BQADBAADhwIAAl9XmQABWvs7xkCDldkC': 'r_5',
'BQADBAADiQIAAl9XmQABjwABH5ZonWn8Ag': 'r_6',
'BQADBAADiwIAAl9XmQABjekJfm4fBDIC': 'r_7',
'BQADBAADjQIAAl9XmQABqFjchpsJeEkC': 'r_8',
'BQADBAADjwIAAl9XmQAB-sKdcgABdNKDAg': 'r_9',
'BQADBAADkQIAAl9XmQABtw9RPVDHZOQC': 'r_draw',
'BQADBAADlQIAAl9XmQABtG2GixCxtX4C': 'r_skip',
'BQADBAADkwIAAl9XmQABz2qyEbabnVsC': 'r_reverse',
'BQADBAADlwIAAl9XmQABAb3ZwTGS1lMC': 'y_0',
'BQADBAADmQIAAl9XmQAB9v5qJk9R0x8C': 'y_1',
'BQADBAADmwIAAl9XmQABCsgpRHC2g-cC': 'y_2',
'BQADBAADnQIAAl9XmQAB3kLLXCv-qY0C': 'y_3',
'BQADBAADnwIAAl9XmQAB7R_y-NexNLIC': 'y_4',
'BQADBAADoQIAAl9XmQABl-7mwsjD-cMC': 'y_5',
'BQADBAADowIAAl9XmQABwbVsyv2MfPkC': 'y_6',
'BQADBAADpQIAAl9XmQABoBqC0JsemVwC': 'y_7',
'BQADBAADpwIAAl9XmQABpkwAAeh9ldlHAg': 'y_8',
'BQADBAADqQIAAl9XmQABpSBEUfd4IM8C': 'y_9',
'BQADBAADqwIAAl9XmQABMt-2zW0VYb4C': 'y_draw',
'BQADBAADrwIAAl9XmQABIDf-_TuuxtEC': 'y_skip',
'BQADBAADrQIAAl9XmQABm9M0Zh-_UwkC': 'y_reverse',
'BQADBAADYQIAAl9XmQAB_HWlvZIscDEC': 'draw_four',
'BQADBAADXwIAAl9XmQABY_ksDdMex-wC': 'colorchooser'
}
# sticker_id
#sticker_id = [['b_0', '43161736970240581'], ['b_1', '43161736970240583'], ['b_2', '43161736970240585'], ['b_3', '43161736970240587'], ['b_4', '43161736970240589'], ['b_5', '43161736970240591'], ['b_6', '43161736970240593'], ['b_7', '43161736970240595'], ['b_8', '43161736970240597'], ['b_9', '43161736970240599'], ['b_draw', '43161736970240601'], ['b_skip', '43161736970240605'], ['b_reverse', '43161736970240603'], ['g_0', '43161736970240611'], ['g_1', '43161736970240613'], ['g_2', '43161736970240615'], ['g_3', '43161736970240617'], ['g_4', '43161736970240619'], ['g_5', '43161736970240621'], ['g_6', '43161736970240623'], ['g_7', '43161736970240625'], ['g_8', '43161736970240627'], ['g_9', '43161736970240629'], ['g_draw', '43161736970240631'], ['g_skip', '43161736970240635'], ['g_reverse', '43161736970240633'], ['r_0', '43161736970240637'], ['r_1', '43161736970240639'], ['r_2', '43161736970240641'], ['r_3', '43161736970240643'], ['r_4', '43161736970240645'], ['r_5', '43161736970240647'], ['r_6', '43161736970240649'], ['r_7', '43161736970240651'], ['r_8', '43161736970240653'], ['r_9', '43161736970240655'], ['r_draw', '43161736970240657'], ['r_skip', '43161736970240661'], ['r_reverse', '43161736970240659'], ['y_0', '43161736970240663'], ['y_1', '43161736970240665'], ['y_2', '43161736970240667'], ['y_3', '43161736970240669'], ['y_4', '43161736970240671'], ['y_5', '43161736970240673'], ['y_6', '43161736970240675'], ['y_7', '43161736970240677'], ['y_8', '43161736970240679'], ['y_9', '43161736970240681'], ['y_draw', '43161736970240683'], ['y_skip', '43161736970240687'], ['y_reverse', '43161736970240685'], ['draw_four', '43161736970240609'], ['colorchooser', '43161736970240607']]
GREY_SET_ID = '43161736970240002'
# only grey ordinary cards are useful
GREY_ID = {
'43161736970240581': 'b_0',
'43161736970240583': 'b_1',
'43161736970240585': 'b_2',
'43161736970240587': 'b_3',
'43161736970240589': 'b_4',
'43161736970240591': 'b_5',
'43161736970240593': 'b_6',
'43161736970240595': 'b_7',
'43161736970240597': 'b_8',
'43161736970240599': 'b_9',
'43161736970240601': 'b_draw',
'43161736970240605': 'b_skip',
'43161736970240603': 'b_reverse',
'43161736970240611': 'g_0',
'43161736970240613': 'g_1',
'43161736970240615': 'g_2',
'43161736970240617': 'g_3',
'43161736970240619': 'g_4',
'43161736970240621': 'g_5',
'43161736970240623': 'g_6',
'43161736970240625': 'g_7',
'43161736970240627': 'g_8',
'43161736970240629': 'g_9',
'43161736970240631': 'g_draw',
'43161736970240635': 'g_skip',
'43161736970240633': 'g_reverse',
'43161736970240637': 'r_0',
'43161736970240639': 'r_1',
'43161736970240641': 'r_2',
'43161736970240643': 'r_3',
'43161736970240645': 'r_4',
'43161736970240647': 'r_5',
'43161736970240649': 'r_6',
'43161736970240651': 'r_7',
'43161736970240653': 'r_8',
'43161736970240655': 'r_9',
'43161736970240657': 'r_draw',
'43161736970240661': 'r_skip',
'43161736970240659': 'r_reverse',
'43161736970240663': 'y_0',
'43161736970240665': 'y_1',
'43161736970240667': 'y_2',
'43161736970240669': 'y_3',
'43161736970240671': 'y_4',
'43161736970240673': 'y_5',
'43161736970240675': 'y_6',
'43161736970240677': 'y_7',
'43161736970240679': 'y_8',
'43161736970240681': 'y_9',
'43161736970240683': 'y_draw',
'43161736970240687': 'y_skip',
'43161736970240685': 'y_reverse'
}