if event.type == VkBotEventType.MESSAGE_NEW and (action := event.obj['message'].get('action')):
if action['type'] == 'chat_invite_user' and action["member_id"] == -12345678: #вместо -12345678 айди группы с минусом
vk.messages.send(
peer_id=event.message.peer_id,
random_id=get_random_id(),
message="Привет")
import discord
from discord.ext import commands
bot = commands.Bot(command_prefix='!')
@bot.command()
async def play(ctx):
voice_channel = ctx.author.voice.channel
voice_client = await voice_channel.connect()
audio_source = discord.FFmpegPCMAudio('test.mp3')
voice_client.play(audio_source)
import json
async def downloader_json(update, context):
file = await context.bot.get_file(update.message.document)
downloaded_file = await file.download()
with open('items.json', 'w') as f:
content = await downloaded_file.read()
json.dump(content.decode('utf-8'), f)
if event.type == VkBotEventType.MESSAGE_NEW and (action := event.obj['message'].get('action')):
if action['type'] == 'chat_invite_user' and action["member_id"] == -12345678: #вместо -12345678 айди группы с минусом
vk.messages.send(
peer_id=event.message.peer_id,
random_id=get_random_id(),
message="Привет")