Buy tickets (200 coins each, max 100/draw); one winner is drawn daily at 21:00 Tallinn time weighted by ticket count and credited the whole pot. Coin-conserving by design: each ticket's cost is deducted at purchase and the winner is minted exactly the sum of all ticket spend - no shared pot record, so no cross-period race. Ticket state lives per-user keyed by draw period (full scan only at draw time and for the pot view). - New lottery.py: TICKET_COST/MAX_TICKETS/DRAW_HOUR, pure period_for, and do_buy_ticket / get_lottery_state / do_lottery_draw. New lottery_tickets + lottery_period schema fields (period added to _TEXT_FIELDS). - /lottery [kogus] command (view or buy) with full failure handling. - Scheduled lottery_draw_daily loop in bot.py (both profiles; each draws its own collection), announcing to the optional LOTTERY_CHANNEL_ID (config + .env). 14 tests: period boundary, buy/accumulate/reset/caps/guards, pot state, draw payout with coin conservation, and the more-tickets-wins-more weighting. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013VbAVsrZuYesea99mPMmPT
201 lines
3.4 KiB
Python
201 lines
3.4 KiB
Python
"""All user-facing text for TipiLAN Bot.
|
|
|
|
Strings live in domain submodules (common, commands, member, economy, admin,
|
|
games, fishing) and are re-exported here, so ``import strings`` and
|
|
``strings.NAME`` keep working unchanged. Edit the relevant submodule to change
|
|
any message, description, or flavour text without touching any logic code."""
|
|
|
|
from .common import (
|
|
MSG_BANNED,
|
|
MSG_SPAM_JAIL,
|
|
MSG_PONG,
|
|
MSG_RESTART_DONE,
|
|
MSG_RESTARTING,
|
|
MSG_SHUTTING_DOWN,
|
|
MSG_PAUSED,
|
|
MSG_UNPAUSED,
|
|
MSG_MAINTENANCE,
|
|
MSG_SYNC_DONE,
|
|
MSG_REMINDER,
|
|
MSG_LEVELUP,
|
|
MSG_LEVELUP_ROLE,
|
|
REMINDER_OPTS,
|
|
TITLE,
|
|
ERR,
|
|
CD_MSG,
|
|
REMINDERS_UI,
|
|
SEND_UI,
|
|
PATCHNOTES_UI,
|
|
STATUS_UI,
|
|
)
|
|
|
|
from .commands import (
|
|
CMD,
|
|
OPT,
|
|
HELP_CATEGORIES,
|
|
HELP_UI,
|
|
)
|
|
|
|
from .member import (
|
|
MEMBER_UI,
|
|
MEMBER_FIELDS,
|
|
ECONOMYSETUP_UI,
|
|
CHANNEL_UI,
|
|
BIRTHDAY_UI,
|
|
BIRTHDAY_MONTHS,
|
|
CHECK_UI,
|
|
)
|
|
|
|
from .economy import (
|
|
WORK_JOBS,
|
|
BEG_LINES,
|
|
BEG_JAIL_LINES,
|
|
CRIME_WIN,
|
|
CRIME_LOSE,
|
|
QUEST_UI,
|
|
QUEST_DESCRIPTIONS,
|
|
SHOP_UI,
|
|
ITEM_DESCRIPTIONS,
|
|
CONSUMABLES_UI,
|
|
CONSUMABLE_DESCRIPTIONS,
|
|
VANITY_UI,
|
|
LOOTBOX_UI,
|
|
BANK_UI,
|
|
ACHIEVEMENTS_UI,
|
|
LOTTERY_UI,
|
|
JAILED_UI,
|
|
SHOP_BTN,
|
|
DAILY_UI,
|
|
STATS_UI,
|
|
PROFILE_UI,
|
|
BALANCE_UI,
|
|
COOLDOWNS_UI,
|
|
RANK_UI,
|
|
WORK_UI,
|
|
BEG_UI,
|
|
CRIME_UI,
|
|
ROB_UI,
|
|
GIVE_UI,
|
|
BUY_UI,
|
|
LEADERBOARD_UI,
|
|
REQUEST_UI,
|
|
)
|
|
|
|
from .admin import (
|
|
ADMINVIEW_UI,
|
|
ADMIN,
|
|
SEASON,
|
|
PRESTIGE_SHOP_NAMES,
|
|
PRESTIGE_SHOP_DESCRIPTIONS,
|
|
PRESTIGE_UI,
|
|
)
|
|
|
|
from .games import (
|
|
SLOTS_TIERS,
|
|
ROULETTE,
|
|
HEIST_STORY,
|
|
HEIST_UI,
|
|
BJ,
|
|
JAILBREAK_UI,
|
|
SLOTS_UI,
|
|
RPS_UI,
|
|
RPS_CHOICES,
|
|
BJ_UI,
|
|
)
|
|
|
|
from .fishing import (
|
|
FISH_NAMES,
|
|
FISH_RARITY_NAMES,
|
|
FISH_RARITY_EMOJI,
|
|
FISH_JUNK_LINES,
|
|
FISH_UI,
|
|
)
|
|
|
|
__all__ = [
|
|
'MSG_BANNED',
|
|
'MSG_SPAM_JAIL',
|
|
'MSG_PONG',
|
|
'MSG_RESTART_DONE',
|
|
'MSG_RESTARTING',
|
|
'MSG_SHUTTING_DOWN',
|
|
'MSG_PAUSED',
|
|
'MSG_UNPAUSED',
|
|
'MSG_MAINTENANCE',
|
|
'MSG_SYNC_DONE',
|
|
'MSG_REMINDER',
|
|
'MSG_LEVELUP',
|
|
'MSG_LEVELUP_ROLE',
|
|
'REMINDER_OPTS',
|
|
'TITLE',
|
|
'ERR',
|
|
'CD_MSG',
|
|
'REMINDERS_UI',
|
|
'SEND_UI',
|
|
'PATCHNOTES_UI',
|
|
'STATUS_UI',
|
|
'CMD',
|
|
'OPT',
|
|
'HELP_CATEGORIES',
|
|
'HELP_UI',
|
|
'MEMBER_UI',
|
|
'MEMBER_FIELDS',
|
|
'ECONOMYSETUP_UI',
|
|
'CHANNEL_UI',
|
|
'BIRTHDAY_UI',
|
|
'BIRTHDAY_MONTHS',
|
|
'CHECK_UI',
|
|
'WORK_JOBS',
|
|
'BEG_LINES',
|
|
'BEG_JAIL_LINES',
|
|
'CRIME_WIN',
|
|
'CRIME_LOSE',
|
|
'QUEST_UI',
|
|
'QUEST_DESCRIPTIONS',
|
|
'SHOP_UI',
|
|
'ITEM_DESCRIPTIONS',
|
|
'CONSUMABLES_UI',
|
|
'CONSUMABLE_DESCRIPTIONS',
|
|
'VANITY_UI',
|
|
'LOOTBOX_UI',
|
|
'BANK_UI',
|
|
'ACHIEVEMENTS_UI',
|
|
'LOTTERY_UI',
|
|
'JAILED_UI',
|
|
'SHOP_BTN',
|
|
'DAILY_UI',
|
|
'STATS_UI',
|
|
'PROFILE_UI',
|
|
'BALANCE_UI',
|
|
'COOLDOWNS_UI',
|
|
'RANK_UI',
|
|
'WORK_UI',
|
|
'BEG_UI',
|
|
'CRIME_UI',
|
|
'ROB_UI',
|
|
'GIVE_UI',
|
|
'BUY_UI',
|
|
'LEADERBOARD_UI',
|
|
'REQUEST_UI',
|
|
'ADMINVIEW_UI',
|
|
'ADMIN',
|
|
'SEASON',
|
|
'PRESTIGE_SHOP_NAMES',
|
|
'PRESTIGE_SHOP_DESCRIPTIONS',
|
|
'PRESTIGE_UI',
|
|
'SLOTS_TIERS',
|
|
'ROULETTE',
|
|
'HEIST_STORY',
|
|
'HEIST_UI',
|
|
'BJ',
|
|
'JAILBREAK_UI',
|
|
'SLOTS_UI',
|
|
'RPS_UI',
|
|
'RPS_CHOICES',
|
|
'BJ_UI',
|
|
'FISH_NAMES',
|
|
'FISH_RARITY_NAMES',
|
|
'FISH_RARITY_EMOJI',
|
|
'FISH_JUNK_LINES',
|
|
'FISH_UI',
|
|
]
|