Minor bug fixes

This commit is contained in:
Thomas Smyth 2020-10-13 22:37:53 +01:00
parent 4c8364b86e
commit b8e9506cbf
3 changed files with 6 additions and 8 deletions

View File

@ -4,10 +4,8 @@ import printLogo from 'squad-server/logo';
const configPath = process.argv[2] || './config.json';
printLogo();
SquadServer.buildFromConfig(configPath)
.then((server) => {
return server.watch();
})
.then(() => {
console.log('Watching...');
SquadServer.buildFromConfig(configPath).then((server) => {
server.watch().then(() => {
console.log(`Watching ${server.serverName}...`);
});
});

View File

@ -148,7 +148,7 @@ export default class Rcon extends EventEmiiter {
steamID: message[2],
name: message[3],
message: message[4],
time: Date.now()
time: new Date()
});
} else if (decodedPacket.id === END_PACKET_ID) {
if (this.ignoreNextEndPacket) {

View File

@ -26,7 +26,7 @@ export default class DiscordBasePlugin extends BasePlugin {
async sendDiscordMessage(message, channelID = this.channelID) {
if (this.channel === null) this.channel = await this.discordClient.channels.fetch(channelID);
if ('embed' in message) message.embed.footer.text = COPYRIGHT_MESSAGE;
if ('embed' in message) message.embed.footer = { text: COPYRIGHT_MESSAGE };
await this.channel.send(message);
}