let voiceonline = guild.voiceStates.cache.filter(e => e.channelID).size;
@client.event
async def on_voice_state_update(member, before, after):
role1 = discord.utils.get(member.guild.roles, id = 804852310966140978)
if before.channel:
if before.channel.id == 804901448931475506:
await member.remove_roles(role1)
const Discord = require("discord.js");
const bot = new Discord.Client();
bot.on("ready", async () => {
console.log("Bot Connected");
global.tdict = {};
await bot.user.setActivity("r!help", { type: "PLAYING" });
});
bot.on("voiceStateUpdate", async (before, after) => {
const author = before.member.id || after.member.id;
if (!before.channel && after.channel) {
console.log("1");
const t1 = Math.floor(Date.now() / 1000);
global.tdict[author] = t1;
} else if (before.channel && !after.channel && global.tdict.hasOwnProperty(author)) {
const t2 = Math.floor(Date.now() / 1000);
console.log("0");
console.log(t2 - global.tdict[author]);
}
});
/* urlBase.json */
[
{
"name": "google",
"url": "https://google.com"
},
{
"name": "vk",
"url": "https://vk.com"
}
]
/* ... */
import urlBase from "./urlBase.json"
/*...*/
const targetSite = urlBase.find( e => e.name === name )
return getTargetSiteStatus(targetSite)
console.log('START')
OPTcompileSCSS()
console.log('END')
console.time('OPTcompileSCSS')
OPTcompileSCSS()
console.timeEnd('OPTcompileSCSS')
Base table or view not found: 1146 Table 'visualstudy.post_every_day_post_every_day_tag'
Schema::create('post_everyday_conect_to_tags',
'App\PostEveryDayTag'
'App\PostEveryDay'