const Discord = module.require("discord.js");
const fs = require("fs");
module.exports.run = async (bot,message,args) => {
let a = message.author
let embed = new Discord.RichEmbed()
.setDescription("Информация о сервере")
.setColor('#10c7e2')
.addField("Имя",a.username)
.addField("Тэг",a.tag)
.addField("Дискриминатор",a.discriminator)
.addField("Создание аккаунта",a.createdAt)
.addField("ID",a.id)
.addField("Вы бот?",a.bot)
.setThumbnail(a.avatarURL)
bot.send(embed);
};
module.exports.help = {
name: "userinfo"
};
const mysql = require(`mysql`)
const connection = mysql.createConnection({
host: "",
user: "",
password: "",
database: ""
multipleStatements: true;
});
/**
* A ping pong bot, whenever you send "ping", it replies "pong".
*/
// Import the discord.js module
const Discord = require('discord.js');
// Create an instance of a Discord client
const client = new Discord.Client();
/**
* The ready event is vital, it means that only _after_ this will your bot start reacting to information
* received from Discord
*/
client.on('ready', () => {
console.log('I am ready!');
});
// Create an event listener for messages
client.on('message', message => {
// If the message is "ping"
if (message.content === 'ping') {
// Send "pong" to the same channel
message.channel.send('pong');
}
});
// Log our bot in using the token from https://discordapp.com/developers/applications/me
client.login('your token here');
Есть догадка - комп перегревается!
т. к. комп подвисает и в холодном состоянии (иногда даже если только включился)