const openButton = document.querySelector(".profile__Info-button");
const closeButton = document.querySelector(".profile__buttonClose");
openButton.addEventListener("click", showForm);
closeButton.addEventListener("click", closeForm);
function showForm () {
document.getElementById("form").style.display = "flex";
}
function closeForm(e) {
document.getElementById("form").style.display = "none";
}
from discord.ext import commands
bot = commands.Bot(command_prefix='$')
@bot.command()
async def test(ctx):
pass
@bot.command()
async def test1(ctx):
pass
/* eslint-disable-next-line */
for (const arr of arrayOfLabel) {
class Bot:
def __init__(self):
self.handlers = dict()
self.on_message = None
def on(self, command):
def decorator(func):
self.handlers[command] = func
return func
return decorator
def handle(self, event)
if event["object"]["message"]["text"] in self.handlers:
self.handlers[event["object"]["message"]["text"]](event["object"])
elif self.on_message is not None:
self.on_message(event["object"])
bot = Bot()
@bot.on("привет")
def hello_handler(msg):
print(f"Hello: {msg}")
# Для ответа можете реализовать отдельную функцию, которая обращается к vk_api
def on_message(msg):
print(msg)
import sha256 from 'crypto-js/sha256';
import hmacSHA512 from 'crypto-js/hmac-sha512';
import Base64 from 'crypto-js/enc-base64';
const message, nonce, path, privateKey;
const hashDigest = sha256(nonce + message);
const hmacDigest = Base64.stringify(hmacSHA512(path + hashDigest, privateKey));
import threading
def loop():
while True:
x=input()
application.ui.label.setText(x)
t = threading.Thread(target=loop, args=())
t.start()