Forwarded from Archibald McNuggets
отправка фото
@dp.message_handler(commands=['photo'])
def get_user_photo(message: types.Message):
bot.send_photo(message.chat.id, "https://i.imgur.com/ofwPfHE.png")
Forwarded from Archibald McNuggets
elif message.text == "Фото":
bot.send_photo(message.chat.id, "https://i.imgur.com/ofwPfHE.png")
Forwarded from Archibald McNuggets
@dp.message_handler(commands=['audio'])
def cmd_send_audio(message:types.Message):
bot.send_audio(message.from_user.id , audio.get('https://s1.muzati.net/files/mp3/anna_asti_-_noch_yu_na_kuhne_muzati.net.mp3'))
Forwarded from Archibald McNuggets
@dp.message_handler(commands=['video'])
def cmd_send_video(message:types.Message):
bot.send_video(message.from_user.id, 'https://youtu.be/Go5vkdgBRqg')
Forwarded from Python (Liksa Kina)
#Импортируем библиотеки для кнопокfrom aiogram.types import ReplyKeyboardRemove, \
ReplyKeyboardMarkup, KeyboardButton, \
InlineKeyboardMarkup, InlineKeyboardButton
#Создаем переменную и вставляем значение клавиатурыbutton_hi = KeyboardButton('Привет! 👋')
greet_kb = ReplyKeyboardMarkup()
#добавляем кнопку в массив с клавиаутуройgreet_kb.add(button_hi)
@dp.message_handler(commands=['start'])
async def cmd_start(message: types.Message):
#reply_markup отображение клавиатуры await bot.send_message(message.from_user.id,'Текст', reply_markup=greet_kb)
import valve.rcon
address = ("ип адрес сервера", порт)
password = "пароль RCON"
with valve.rcon.RCON(address, password) as rcon:
response = rcon.execute("команда пример: status")
print(response.text)
address = ("ип адрес сервера", порт)
password = "пароль RCON"
with valve.rcon.RCON(address, password) as rcon:
response = rcon.execute("команда пример: status")
print(response.text)
{
"messages": [
{
"role": "user",
"content": "привет"
}
],
"model": "gpt-3.5-turbo",
"temperature": 0.5,
"presence_penalty": 0,
"frequency_penalty": 0,
"top_p": 1
}
"messages": [
{
"role": "user",
"content": "привет"
}
],
"model": "gpt-3.5-turbo",
"temperature": 0.5,
"presence_penalty": 0,
"frequency_penalty": 0,
"top_p": 1
}