data = json.loads("{...}")
for key,value in data.items():
print(key)#blablaone и blablatwo
for url in value:
print("\t",url)
class MyClient(discord.Client):
...
async def on_voice_state_update(self, member, before, after):
if after.channel and after.channel!=before.channel:
print(f"Пользователь {member.name} зашол на {after.channel.name}")
if before.channel and after.channel!=before.channel:
print(f"Пользователь {member.name} вышел с {before.channel.name}")
getResource = async () => await fetch("/pos",
{
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
method: "POST",
body: '{"names":"NeiroN"}'
}).then(function(res){
if (!res.ok) throw Error(`is not ok: ${res.status}`);
//detect json
if(res.headers.get("Content-Type").includes("json")){
return res.json();
}else{
return res.text();
}
}).catch(function(res){
//Errors
console.log(res);
//returned if errors
return "Error!";
});