Updated statuses
This commit is contained in:
@@ -1,11 +1,12 @@
|
|||||||
|
import { ActivityType, Guild } from "discord.js"
|
||||||
|
|
||||||
const statuses = [
|
const statuses = [
|
||||||
{ name: "over the Illegitimate Server", type: 3 },
|
{ name: (guild: Guild) => { return `over ${guild.memberCount} members` }, type: ActivityType.Watching },
|
||||||
{ name: "jon and pit edate", type: 3 },
|
{ name: "over the Illegitimate Server", type: ActivityType.Watching },
|
||||||
{ name: "for Martina's return", type: 3 },
|
{ name: "jon and pit edate", type: ActivityType.Watching },
|
||||||
{ name: "w vri's feelings", type: 0 },
|
{ name: "for Martina's return", type: ActivityType.Watching },
|
||||||
{ name: "urCryhard steal finals again", type: 3 },
|
{ name: "w vri's feelings", type: ActivityType.Playing },
|
||||||
{ name: "with Perlcence the AI", type: 0 },
|
{ name: "urCryhard steal finals again", type: ActivityType.Watching },
|
||||||
{ name: "with ur mom in my bed", type: 0 },
|
{ name: "with Perlcence the AI", type: ActivityType.Playing },
|
||||||
{ name: "with Jone the idiot", type: 0 }
|
|
||||||
]
|
]
|
||||||
export = statuses
|
export = statuses
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
|
import { guildid } from "config/options"
|
||||||
import statuses from "config/statuses"
|
import statuses from "config/statuses"
|
||||||
|
import { Guild } from "discord.js"
|
||||||
import { IEvent } from "interfaces"
|
import { IEvent } from "interfaces"
|
||||||
import { ExtendedClient as Client } from "utils/Client"
|
import { ExtendedClient as Client } from "utils/Client"
|
||||||
|
|
||||||
@@ -8,22 +10,24 @@ export = {
|
|||||||
event: "ready",
|
event: "ready",
|
||||||
|
|
||||||
execute(client: Client) {
|
execute(client: Client) {
|
||||||
// Playing 0
|
|
||||||
// Streaming 1
|
|
||||||
// Listening 2
|
|
||||||
// Watching 3
|
|
||||||
// Custom 4
|
|
||||||
// Competing 5
|
|
||||||
|
|
||||||
const user = client.user!
|
const user = client.user!
|
||||||
|
const guild = client.guilds.cache.get(guildid) as Guild
|
||||||
|
|
||||||
user.setActivity({ name: statuses[0].name, type: statuses[0].type })
|
function getActivity(status: ((guild: Guild) => string) | string): string {
|
||||||
|
if (typeof status === "function") {
|
||||||
|
return status(guild)
|
||||||
|
} else {
|
||||||
|
return status
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
user.setActivity({ name: getActivity(statuses[0].name), type: statuses[0].type })
|
||||||
|
|
||||||
let i = 1
|
let i = 1
|
||||||
setInterval(
|
setInterval(() => {
|
||||||
() => user.setActivity(statuses[i++ % statuses.length]),
|
const status = i++ % statuses.length
|
||||||
1000 * 60 * 10
|
user.setActivity({ name: getActivity(statuses[status].name), type: statuses[status].type })
|
||||||
)
|
}, 1000 * 60 * 10)
|
||||||
|
|
||||||
user.setStatus("dnd")
|
user.setStatus("dnd")
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user