исправленные import-ы

This commit is contained in:
mega_krevetka committed 2026-03-31 11:35:15 +03:00
1 parent ac1a49e6d1
commit c2af6d30ae
3 files changed
+142

No files matched your search

Generated
+1
View File
@@ -0,0 +1 @@
Fox_hahBot.py
+89
View File
@@ -0,0 +1,89 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="AutoImportSettings">
<option name="autoReloadType" value="SELECTIVE" />
</component>
<component name="ChangeListManager">
<list default="true" id="aaf4cea1-996f-4616-a7e8-5aebcf6aea3e" name="Changes" comment="исправленные import-ы">
<change beforePath="$PROJECT_DIR$/.idea/.gitignore" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/modules.xml" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/python.iml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/python.iml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/vcs.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/vcs.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/BotForTelegramm/Fox_hahBot.py" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/BotForTelegramm/Fox_hahBot.py.py" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/BotForTelegramm/Fox_hahBot2.py" beforeDir="false" afterPath="$PROJECT_DIR$/BotForTelegramm/Fox_hahBot2.py" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="Git.Settings">
<option name="PUSH_TAGS">
<GitPushTagMode>
<option name="argument" value="--tags" />
<option name="title" value="All" />
</GitPushTagMode>
</option>
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
<option name="ROOT_SYNC" value="SYNC" />
<option name="UPDATE_TYPE" value="REBASE" />
</component>
<component name="ProjectColorInfo">{
&quot;associatedIndex&quot;: 6
}</component>
<component name="ProjectId" id="3BhbFCTFV4R0VVKYpM8sZkvMBml" />
<component name="ProjectViewState">
<option name="hideEmptyMiddlePackages" value="true" />
<option name="showLibraryContents" value="true" />
</component>
<component name="PropertiesComponent"><![CDATA[{
"keyToString": {
"ASKED_SHARE_PROJECT_CONFIGURATION_FILES": "true",
"ModuleVcsDetector.initialDetectionPerformed": "true",
"RunOnceActivity.ShowReadmeOnStart": "true",
"RunOnceActivity.git.unshallow": "true",
"git-widget-placeholder": "main",
"last_opened_file_path": "C:/Users/Dream/python",
"settings.editor.selected.configurable": "com.jetbrains.python.configuration.PyActiveSdkModuleConfigurable"
}
}]]></component>
<component name="SharedIndexes">
<attachedChunks>
<set>
<option value="bundled-python-sdk-890ed5b35930-d9c5bdb153f4-com.jetbrains.pycharm.pro.sharedIndexes.bundled-PY-251.23774.444" />
</set>
</attachedChunks>
</component>
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="aaf4cea1-996f-4616-a7e8-5aebcf6aea3e" name="Changes" comment="" />
<created>1774944142700</created>
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1774944142700</updated>
</task>
<task id="LOCAL-00001" summary="исправленные import-ы">
<option name="closed" value="true" />
<created>1774944502132</created>
<option name="number" value="00001" />
<option name="presentableId" value="LOCAL-00001" />
<option name="project" value="LOCAL" />
<updated>1774944502132</updated>
</task>
<task id="LOCAL-00002" summary="исправленные import-ы">
<option name="closed" value="true" />
<created>1774944573973</created>
<option name="number" value="00002" />
<option name="presentableId" value="LOCAL-00002" />
<option name="project" value="LOCAL" />
<updated>1774944573973</updated>
</task>
<option name="localTasksCounter" value="3" />
<servers />
</component>
<component name="VcsManagerConfiguration">
<MESSAGE value="исправленные import-ы" />
<option name="LAST_COMMIT_MESSAGE" value="исправленные import-ы" />
</component>
</project>
+52
View File
@@ -0,0 +1,52 @@
import telebot
import random
token = "8379986047:AAGr74CT6Y2a8moIWL4Otsntu1CjozdF9ec"
bot = telebot.TeleBot(token)
wins = {}
loose = {}
draw = {}
dif = {}
def addUserIfNotExist(message):
if not wins[message.from_user.id]:
wins[message.from_user.id] = 0
if not loose[message.from_user.id]:
loose[message.from_user.id] = 0
if not draw[message.from_user.id]:
draw[message.from_user.id] = 0
if not dif[message.from_user.id]:
dif[message.from_user.id] = 0
@bot.message_handler(commands=['start'])
def start(message):
bot.send_message(message.chat.id, 'Привет, это игра "Камень, ножницы, бумага"')
@bot.message_handler(commands=['rules'])
def rules(message):
bot.send_message(message.chat.id, 'Правила: выбираешь "Камень", "Ножницы" или "Бумага", если ты выиграл я напишу, а если нет, то ладно')
@bot.message_handler(func=lambda message:True)
def main_game(message):
ans = random.randint(1,3) #1 - камень, 2 - бумага, 3 - ножницы
if message.text == "Камень" and ans == 1:
bot.send_message(message.chat.id, "Ничья")
elif message.text == "Камень" and ans == 2:
bot.send_message(message.chat.id, "ХАХАХАХ!!! ТЫ ПРОИГРАЛ!")
elif message.text == "Камень" and ans == 3:
bot.send_message(message.chat.id, "НУУ БЛИИИН!!! ТЫ ВЫИГРАЛ!")
elif message.text == "Бумага" and ans == 2:
bot.send_message(message.chat.id, "Ничья")
elif message.text == "Бумага" and ans == 3:
bot.send_message(message.chat.id, "ХАХАХАХ!!! ТЫ ПРОИГРАЛ!")
elif message.text == "Бумага" and ans == 1:
bot.send_message(message.chat.id, "НУУ БЛИИИН!!! ТЫ ВЫИГРАЛ!")
elif message.text == "Ножницы" and ans == 1:
bot.send_message(message.chat.id, "ХАХАХАХ!!! ТЫ ПРОИГРАЛ!")
elif message.text == "Ножницы" and ans == 2:
bot.send_message(message.chat.id, "НУУ БЛИИИН!!! ТЫ ВЫИГРАЛ!")
elif message.text == "Ножницы" and ans == 3:
bot.send_message(message.chat.id, "Ничья")
bot.infinity_polling()