Basic Bot setup
This commit is contained in:
21
src/events/ready/changeStatus.ts
Normal file
21
src/events/ready/changeStatus.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import { Client, ActivityType } from "discord.js";
|
||||
|
||||
const status = [ make_status("Slash Commands"), make_status("/help"), make_status("by Agione") ];
|
||||
|
||||
export default async (client: Client<true>) => {
|
||||
client.user?.setActivity(status[0]);
|
||||
|
||||
setInterval(() => {
|
||||
let random = Math.floor(Math.random() * status.length);
|
||||
client.user?.setActivity(status[random]);
|
||||
}, 10000);
|
||||
|
||||
};
|
||||
|
||||
function make_status(name: string){
|
||||
return {
|
||||
name: name,
|
||||
type: ActivityType.Streaming,
|
||||
url: "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user