New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

discord-bot-status

Package Overview
Dependencies
Maintainers
0
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

discord-bot-status - npm Package Compare versions

Comparing version 1.1.0 to 1.2.0

31

index.js

@@ -19,18 +19,25 @@ const { Client, Intents, MessageEmbed, TextChannel } = require('discord.js');

startStatusUpdates() {
console.log("BotStatus: startStatusUpdates called"); // Check if this is called
this.client.once('ready', async () => {
console.log("BotStatus: Bot is ready, setting up the channel...");
const channel = await this.client.channels.fetch(this.channelId);
console.log("BotStatus: Client ready, attempting to fetch channel..."); // Confirm we’re here
try {
const channel = await this.client.channels.fetch(this.channelId);
console.log("BotStatus: Channel fetched:", channel ? "Success" : "Failed");
// Ensure the bot has permissions to view and send messages to the channel
if (!channel || !(channel instanceof TextChannel)) {
console.error('BotStatus: Provided channel is invalid or not accessible.');
return;
}
// Ensure the bot has permissions to view and send messages to the channel
if (!channel || !(channel instanceof TextChannel)) {
console.error('BotStatus: Provided channel is invalid or not accessible.');
return;
}
console.log("BotStatus: Channel found and accessible, sending initial message.");
// Initial status update
await this.updateStatusMessage(channel);
console.log("BotStatus: Channel is valid and accessible.");
// Schedule status updates every 30 seconds
setInterval(() => this.updateStatusMessage(channel), 30000); // 30 seconds
// Initial status update
await this.updateStatusMessage(channel);
// Schedule status updates every 30 seconds
setInterval(() => this.updateStatusMessage(channel), 30000); // 30 seconds
} catch (error) {
console.error("BotStatus: Error fetching the channel:", error);
}
});

@@ -37,0 +44,0 @@ }

{
"name": "discord-bot-status",
"version": "1.1.0",
"version": "1.2.0",
"description": "A package that automatically displays bot status (online/offline, ping) in a specified Discord channel with real-time updates.",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc