From 78220169453a82261e0f16934f98a0fe93619a86 Mon Sep 17 00:00:00 2001 From: Skylar Grant Date: Mon, 23 Jan 2023 20:50:14 -0500 Subject: [PATCH] Add fancy activities --- data/strings.json | 3 +++ main.js | 3 ++- modules/functions.js | 2 +- package.json | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/data/strings.json b/data/strings.json index 8a637c8..e20ffd5 100644 --- a/data/strings.json +++ b/data/strings.json @@ -1,4 +1,7 @@ { + "activity": { + "name": "trees grow" + }, "help": { "info": "This bot will analyze your tree (from the Grow A Tree Bot by Limbo Labs) and compare its growth to other trees displayed on the leaderboard.\n\nThis bot assumes that there is a single message and a single message that everyone uses. If everyone creates their own and , the reference messages will have to be updated every time, or old data will be displayed.", "setup": "To begin analyzing your Tree, first you must set up the reference messages.\n\n1. Run in the channel(s) that contain your server's tree and leaderboard messages.\n2. Now simply run where you want your analysis to be visible.", diff --git a/main.js b/main.js index f1ab4d0..fcfaee8 100644 --- a/main.js +++ b/main.js @@ -7,7 +7,7 @@ const token = process.env.TOKEN; const statusChannelId = process.env.statusChannelId; // Discord.JS -const { Client, GatewayIntentBits, Partials } = require('discord.js'); +const { Client, GatewayIntentBits, Partials, ActivityType } = require('discord.js'); const client = new Client({ intents: [ GatewayIntentBits.Guilds, @@ -29,6 +29,7 @@ const isDev = process.env.isDev; client.once('ready', () => { fn.collections.slashCommands(client); console.log('Ready!'); + client.user.setActivity({ name: strings.activity.name, type: ActivityType.Watching }); client.channels.fetch(statusChannelId).then(channel => { channel.send(`${new Date().toISOString()} -- \nStartup Sequence Complete`); }); diff --git a/modules/functions.js b/modules/functions.js index 4545e92..811ad19 100644 --- a/modules/functions.js +++ b/modules/functions.js @@ -247,7 +247,7 @@ const functions = { if (thisGuildInfo.treeHeight != "") { thisGuildInfoString += `Tree Height: ${thisGuildInfo.treeHeight}\n`; } - return `Here if your servers setup info:\n${thisGuildInfoString}`; + return `Here is your servers setup info:\n${thisGuildInfoString}`; } else { return "Your guild hasn't been set up yet."; } diff --git a/package.json b/package.json index 3dea191..5f9ecbb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "treeanalyzer", - "version": "1.0.4", + "version": "1.0.5", "description": "Analyze Grow A Tree", "main": "main.js", "scripts": {