for ch in range(i):
with open(f'chunk_{ch}', 'rb') as chunk_file:
recordingFile.write(chunk_file.read())
{
"cmd": ["python", "$file"],
"file_patterns": ["*.py"],
"env": {
"PYTHONUNBUFFERED": "1"
},
"cancel": {
"kill": true
},
"encoding": "utf-8"
}
msg = await bot.wait_for('message', timeout=60, check=lambda m: m.channel == message.channel and m.author == message.author)
for attach in msg.attachments:
await attach.save(f"./{message.author.id}.png")
app = Flask(__name__, static_url_path='/js_and_css')
from flask import send_from_directory
@app.route('/css/<filename>')
def css_folder(filename):
return send_from_directory('css', filename)
@app.route('/js/<filename>')
def js_folder(filename):
return send_from_directory('js', filename)
@client.command()
async def news(ctx):
guild = ctx.guild
async for member in guild.fetch_members(limit=None):
if member != client.user:
await member.send("Приветики!")
print("Отправил", member)
@client.command()
async def news(ctx):
guild = ctx.guild
async for member in guild.fetch_members(limit=None):
if not member.bot:
await member.send("Приветики!")
print("Отправил", member)