223 lines
9.5 KiB
Python
223 lines
9.5 KiB
Python
import enum
|
|
|
|
from payphone.core import config
|
|
|
|
|
|
class Mask(enum.IntEnum):
|
|
FERRET = 1278176917123760139 if config.IS_DEBUG else 1278173356423909448
|
|
OCTOPUS = 1278176904410697880 if config.IS_DEBUG else 1278173331421397072
|
|
CAT = 1278176891290783824 if config.IS_DEBUG else 1278173317034934282
|
|
MONKEY = 1278176881195094049 if config.IS_DEBUG else 1278173297456185344
|
|
PANDA = 1278176868767629455 if config.IS_DEBUG else 1278173272390762538
|
|
SHEEP = 1278176856910073946 if config.IS_DEBUG else 1278173251914432563
|
|
HORSE = 1278176842116894760 if config.IS_DEBUG else 1278173237582237708
|
|
BEE = 1278176823846506577 if config.IS_DEBUG else 1278173216652787826
|
|
WILD_BOAR = 1278176806498996235 if config.IS_DEBUG else 1278173196658413649
|
|
DUCK = 1278176794591232102 if config.IS_DEBUG else 1278173181483679918
|
|
CHICKEN = 1278176781790216233 if config.IS_DEBUG else 1278173167218589726
|
|
ELEPHANT = 1278176771413512213 if config.IS_DEBUG else 1278173150063886346
|
|
COW = 1278176761565413483 if config.IS_DEBUG else 1278173125024153733
|
|
DEER = 1278176744691597312 if config.IS_DEBUG else 1278173110105014406
|
|
TURKEY = 1278176730619576321 if config.IS_DEBUG else 1278173091796877363
|
|
DOG = 1278176719932751903 if config.IS_DEBUG else 1278173070846201856
|
|
BEAVER = 1278176709530882091 if config.IS_DEBUG else 1278173051485425705
|
|
CAMEL = 1278176699921465394 if config.IS_DEBUG else 1278173035018584086
|
|
KOALA = 1278176687493746709 if config.IS_DEBUG else 1278173021345021952
|
|
HIPPO = 1278176675846295603 if config.IS_DEBUG else 1278173007419932804
|
|
OSTRICH = 1278176661317095494 if config.IS_DEBUG else 1278172994669248523
|
|
RHINO = 1278176650340864000 if config.IS_DEBUG else 1278172980848885832
|
|
SQUIRREL = 1278176637627924570 if config.IS_DEBUG else 1278172965590274088
|
|
CHAMELEON = 1278176625392877648 if config.IS_DEBUG else 1278172953305022496
|
|
FROG = 1278176614512857088 if config.IS_DEBUG else 1278172937043710094
|
|
SKUNK = 1278176604509442079 if config.IS_DEBUG else 1278172923495976981
|
|
WALRUS = 1278176554723311678 if config.IS_DEBUG else 1278172912368619603
|
|
HEDGEHOG = 1278176541750067252 if config.IS_DEBUG else 1278172899911405678
|
|
PIG = 1278176531415564332 if config.IS_DEBUG else 1278172885239861338
|
|
HEN = 1278176518643646485 if config.IS_DEBUG else 1278172871302184994
|
|
TURTLE = 1278176507428343891 if config.IS_DEBUG else 1278172858199314455
|
|
MOUSE = 1278175957047578696 if config.IS_DEBUG else 1278172846442414081
|
|
RABBIT = 1278175944007487489 if config.IS_DEBUG else 1278172831921999945
|
|
GOAT = 1278175933915856938 if config.IS_DEBUG else 1278172815421472808
|
|
LION = 1278175922964664382 if config.IS_DEBUG else 1278172803534684235
|
|
WOLF = 1278175902047535165 if config.IS_DEBUG else 1278172791052570687
|
|
SNAKE = 1278175869331968061 if config.IS_DEBUG else 1278172776259260547
|
|
LLAMA = 1278175850008674325 if config.IS_DEBUG else 1278172764913799168
|
|
CRAB = 1278175835634925620 if config.IS_DEBUG else 1278172752322232330
|
|
OWL = 1278175822947029152 if config.IS_DEBUG else 1278172738309193749
|
|
BAT = 1278175813572886550 if config.IS_DEBUG else 1278172726426865724
|
|
ZEBRA = 1278175799962505216 if config.IS_DEBUG else 1278172715114565753
|
|
FOX = 1278175788818104474 if config.IS_DEBUG else 1278172702955274292
|
|
GORILLA = 1278175775891259456 if config.IS_DEBUG else 1278172687797194824
|
|
SLOTH = 1278175765661356175 if config.IS_DEBUG else 1278172676837343242
|
|
PUFFER_FISH = 1278175753497743360 if config.IS_DEBUG else 1278172665093558294
|
|
BEAR = 1278175741569142867 if config.IS_DEBUG else 1278172653076746301
|
|
GIRAFFE = 1278175732601983006 if config.IS_DEBUG else 1278172640296702073
|
|
PENGUIN = 1278175721956573236 if config.IS_DEBUG else 1278172627629899808
|
|
PARROT = 1278175706798489642 if config.IS_DEBUG else 1278172600702337074
|
|
|
|
|
|
class CatMask(enum.IntEnum):
|
|
DINOSAUR = 1278255435652010014 if config.IS_DEBUG else 1278254725833297965
|
|
SHLEEPY_CAT = 1278255475066146816 if config.IS_DEBUG else 1278254779767984181
|
|
COZY_CAT = 1278255420124696663 if config.IS_DEBUG else 1278254704324771893
|
|
COQUETTE_CAT = 1278255408254816300 if config.IS_DEBUG else 1278254684200636428
|
|
PANIC_CAT = 1278255451993145345 if config.IS_DEBUG else 1278254760700674098
|
|
|
|
|
|
MASKS_LIST = list(Mask)
|
|
CAT_MASKS_LIST = list(CatMask)
|
|
|
|
TIPS = [
|
|
"You can report calls using `{prefix}report`.",
|
|
"Help us sharing Payphone to make it more active!",
|
|
"You can check your stats with `{prefix}me`.",
|
|
"Emojis will only show if they're from a server Payphone's in.",
|
|
"You cannot send links.",
|
|
"[Vote for Payphone on top.gg](<https://top.gg/bot/1212940413795827763/vote>) to help us reach more users!",
|
|
"[Write a review](<https://top.gg/bot/1212940413795827763#reviews>) to tell everyone your opinion about Payphone!",
|
|
"Calls will be automatically hung up after 15 minutes if nobody talks.",
|
|
"You can change Payphone's prefix with `{prefix}config prefix`.",
|
|
"Do you have any suggestions? Use `{prefix}suggest`!",
|
|
"You can use `{prefix}skip` to directly search for a new call.",
|
|
"The links from `{prefix}history` will take you to that call.",
|
|
"Want to stay hidden? Use `{prefix}mask on`!",
|
|
"Did you know you can check your mask with `{prefix}mask`?",
|
|
"Do you like Payphone? Consider [making a donation](<https://ko-fi.com/payphonedev>) to help us grow Payphone (and keep it running)!",
|
|
"Using `{prefix}friendreq` is the best way to ask the other party to add you.",
|
|
"Enable and disable channels using `{prefix}config enable` and `{prefix}config disable`!",
|
|
"There's a secret easter egg command. Try to find it! (Hint: cat)",
|
|
"Make sure to read Payphone's [Code of Conduct](<https://payphone.nyeki.dev/code-of-conduct>). Let's keep Payphone safe and fun for everyone!",
|
|
f"Join [Payphone's official server](<{config.SERVER_INVITE}>) to participate in polls for new features!",
|
|
"How high are you on the leaderboard? Use `{prefix}me`, `{prefix}leaderboard`, and `{prefix}leaderboard servers` to check it out!",
|
|
]
|
|
|
|
MSGS_PHONE_CALLING = [
|
|
"Dialing now! Please wait...",
|
|
"Trying to connect you...",
|
|
"Making the call, hang tight!",
|
|
"Searching for someone to answer...",
|
|
"Your call is being placed...",
|
|
"Connecting your call now...",
|
|
"Calling! One moment please...",
|
|
"Attempting to reach your contact...",
|
|
"Establishing the connection...",
|
|
"Your call is on the way!",
|
|
]
|
|
|
|
MSGS_PHONE_ANSWERED = [
|
|
"Call connected! You're live!",
|
|
"The call was answered.",
|
|
"Someone picked up the call!",
|
|
"Connected! Start talking.",
|
|
"You're now connected!",
|
|
"The call was successfully answered.",
|
|
"Call picked up! You're connected.",
|
|
"You're now live on the call!",
|
|
"Call answered. Go ahead!",
|
|
"Connection successful! You're live.",
|
|
]
|
|
|
|
MSGS_PHONE_HANGUP_ME = [
|
|
"Call ended. You hung up.",
|
|
"You've disconnected the call.",
|
|
"You ended the call.",
|
|
"Call terminated. You hung up.",
|
|
"You have hung up the call.",
|
|
"You ended the conversation.",
|
|
"You've finished the call.",
|
|
"Call ended by you.",
|
|
"You disconnected the call.",
|
|
"You have ended the call.",
|
|
]
|
|
|
|
MSGS_PHONE_HANGUP_YOU = [
|
|
"The other party has hung up.",
|
|
"Call ended by the other party.",
|
|
"The other person disconnected.",
|
|
"The call was terminated by the other party.",
|
|
"The other person has hung up.",
|
|
"Conversation ended by the other party.",
|
|
"The call has been finished by the other party.",
|
|
"The other party ended the call.",
|
|
"Disconnected by the other party.",
|
|
"The other person ended the call.",
|
|
]
|
|
|
|
MSGS_PHONE_NO_ANSWER = [
|
|
"No answer. Maybe try again later?",
|
|
"It looks like nobody picked up.",
|
|
"The call went unanswered.",
|
|
"No response. Try calling again later.",
|
|
"No one is available to answer.",
|
|
"The call wasn't answered.",
|
|
"Nobody answered the call.",
|
|
"The call went unanswered. Try again soon!",
|
|
"No answer at the moment.",
|
|
"The call wasn't picked up.",
|
|
]
|
|
|
|
MSGS_PHONE_NOT_IN_CALL = [
|
|
"It looks like you're not in a call right now.",
|
|
"No active call at the moment.",
|
|
"You're not connected to any call.",
|
|
"There's no call to hang up right now.",
|
|
"You're not currently on a call.",
|
|
"No call in progress.",
|
|
"You're not in an active call.",
|
|
"There isn't a call to end right now.",
|
|
"You're not on a call.",
|
|
"No ongoing call to disconnect.",
|
|
]
|
|
|
|
CHANNELS_SEARCH_QUEUE = "channels:searching"
|
|
CHANNELS_ONCALL_SET = "channels:on-call"
|
|
MESSAGES_QUEUE = "messages"
|
|
MESSAGE_CONTENTS_QUEUE = "message-contents"
|
|
MESSAGES_PROPAGATION_MAP = "messages-propagation"
|
|
|
|
CALL_MESSAGES_TEMPLATE = "m:%s"
|
|
"""`%s`: Call ID.
|
|
|
|
The key template for call messages hash.
|
|
"""
|
|
|
|
CALL_MESSAGE_CONTENTS_TEMPLATE = "mc:%s"
|
|
"""`%s`: Call ID.
|
|
|
|
The key template for call message contents hash.
|
|
"""
|
|
|
|
CALL_MESSAGE_CONTENTS_HASH_TEMPLATE = "%s-%s"
|
|
"""`%s-%s`: Call ID - Iteration.
|
|
|
|
The key template for call message contents hash keys.
|
|
"""
|
|
|
|
CALL_MESSAGE_FROM_PROPAGATION_TEMPLATE = "mfp:%s"
|
|
"""`%s`: Call ID.
|
|
|
|
A map from propagation IDs to message IDs.
|
|
"""
|
|
|
|
CALL_MESSAGE_CONTENT_ITERATIONS_TEMPLATE = "mci:%s"
|
|
"""`%s`: Call ID.
|
|
|
|
A map of messages to amount of iterations of their message contents.
|
|
"""
|
|
|
|
CALL_MESSAGE_REPLIES_TEMPLATE = "mr:%s"
|
|
"""`%s`: Call ID.
|
|
|
|
A map of message IDs to a `,`-delimited list of message IDs that reply to the message.
|
|
"""
|
|
|
|
CALL_IDS_TO_FLUSH = "call-ids-to-flush"
|
|
"""A set of IDs of calls to flush to the DB."""
|
|
|
|
BAN_TEMPLATE = "b:%s"
|
|
PREFIX_TEMPLATE = "p:%s"
|
|
|
|
EMBED_COLOR = 0xE2D9D0
|
|
|
|
INVISIBLE_CHARACTER = "\u200B"
|