MoreCommands: Remove getloc
This commit is contained in:
parent
6f65f481d3
commit
134235c1e1
1 changed files with 2 additions and 16 deletions
|
|
@ -66,7 +66,7 @@ export default definePlugin({
|
|||
},
|
||||
},
|
||||
{
|
||||
name: "getUptime",
|
||||
name: "getuptime",
|
||||
description: "Returns the system uptime",
|
||||
execute: async () => {
|
||||
const uptime = performance.now() / 1000;
|
||||
|
|
@ -75,27 +75,13 @@ export default definePlugin({
|
|||
},
|
||||
},
|
||||
{
|
||||
name: "getTime",
|
||||
name: "gettime",
|
||||
description: "Returns the current server time",
|
||||
execute: async () => {
|
||||
const currentTime = new Date().toLocaleString();
|
||||
return { content: `> **Current Time**: ${currentTime}` };
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "getLocation",
|
||||
description: "Returns the user's approximate location based on IP",
|
||||
execute: async (opts, ctx) => {
|
||||
try {
|
||||
const response = await fetch("https://ipapi.co/json/");
|
||||
const data = await response.json();
|
||||
const locationInfo = `> **Country**: ${data.country_name}\n> **Region**: ${data.region}\n> **City**: ${data.city}`;
|
||||
return { content: locationInfo };
|
||||
} catch (err) {
|
||||
sendBotMessage(ctx.channel.id, { content: "Failed to fetch location information" });
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "choose",
|
||||
description: "Randomly chooses from provided options",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue