if determine_lang() == 'ru':
ModuleNotFoundError: No module named 'discord.ext.commads'
Homework1 = open('Homework.txt','r')
Homework = Homework1.read()
Homework1.close()
def open_file():
dir = input("Внесите директорию которую вы хотите открыть:")
f = open(dir, 'r')
print(f.read())
f.close()
size = 30
if width > 1000:
size = 50
elif width <= 400:
size = 20
text = 'vk.com/мой_вк'
y = int(height - (size*1.67))
x = int((width - (size*3.34)) - (size/2) * (len(list(text))/2))
font = ImageFont.truetype(PATHS[0], size=size)
color = (255,255,255)
draw.text((x, y), text, color, font)
import vk_api
import datetime
import time
vk = vk_api.VkApi(token="токен")
api = vk.get_api()
group_id = -0
my_id = 0
while True:
text = api.wall.get(owner_id=group_id, count=1)['items'][0]['text']
api.wall.post(owner_id=my_id, from_group=1, message=text)
time.sleep(1000)
import requests
s = requests.Session()
params = {
'chat_id': 18,
'message': 'привет'
'access_token': 'token',
'random_id': 0
'v': 5
}
s.post('https://api.vk.com/method/messages.send', params=params)
# и да хоть бы не палил свой токен
import os
currentPath = os.path.dirname(__file__)
abc = os.path.join(currentPath, "pyti")
SELECT * FROM ваша_таблица WHERE ваш_параметр=чему-то.
# Например
SELECT * FROM MyTable WHERE user_id=12345678