add shuger

This commit is contained in:
vasilytray 2025-03-06 01:26:32 +07:00
parent 13327a9feb
commit 00d175be90

9
bot.py
View File

@ -1,7 +1,11 @@
import os import os
import asyncio import asyncio
import logging import logging
from datetime import datetime
from aiogram import Bot, Dispatcher, types from aiogram import Bot, Dispatcher, types
from aiogram.enums.dice_emoji import DiceEmoji
from aiogram.filters.command import Command from aiogram.filters.command import Command
from dotenv import load_dotenv from dotenv import load_dotenv
@ -44,6 +48,11 @@ async def cmd_reply(message: types.Message):
async def cmd_dice(message: types.Message): async def cmd_dice(message: types.Message):
await message.answer_dice(emoji=DiceEmoji.DICE) await message.answer_dice(emoji=DiceEmoji.DICE)
# передача сообщения в другой чат с номером чата -1001826767638
@dp.message(Command("dice2"))
async def cmd_dice2(message: types.Message, bot: Bot):
await bot.send_dice(-1001826767638, emoji=DiceEmoji.DICE)
# Запуск процесса поллинга новых апдейтов # Запуск процесса поллинга новых апдейтов
async def main(): async def main():
# Регистрируем хэндлер cmd_test2 по команде /start # Регистрируем хэндлер cmd_test2 по команде /start