# bot-source-code-ts# alph4-utils
TS Client JS Code
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module.exports = log; { | ||
console.log("Net loaded") | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
require 'discordrb' | ||
|
||
bot = Discordrb::Bot.new token: 'NzkyNjk2NTgyMzk0MDg1Mzk3.X-heOA.d0EK4DK2pvjZlmF26g8_Wa3rQFM' | ||
|
||
|
||
puts "This bot's invite URL is #{bot.invite_url}." | ||
puts 'Click on it to invite it to your server.' | ||
puts 'Bot owner' | ||
|
||
bot.message(content: 'Ping!') do |event| | ||
event.respond 'Pong!' | ||
end | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { Client, Command } from "../classes"; | ||
import { Message } from "discord.js" | ||
|
||
export default class Bot_name extends Command { | ||
constructor(client: Client) { | ||
super({ | ||
name: "ping", | ||
description: "ping command" | ||
}); | ||
this.client = client; | ||
} | ||
|
||
run(msg: Message, args: string[]) { | ||
|
||
let client = this.client | ||
let embed = msg.channel.send({ | ||
embed: { | ||
color: client.brandingColor, | ||
title: "Ping", | ||
description: `${this.client.ws.ping}MS!` | ||
} | ||
}) | ||
} | ||
} |