import vcord
fn main() {
mut conf := vcord.Config{
token: "BOT_TOKEN",
intents: vcord.all_intents
}
mut bot := vcord.new(mut &conf) ?
bot.on("ready", on_ready)
bot.on("message_create", on_message)
bot.login() ?
}
fn on_ready(mut bot &vcord.Bot, mut event &vcord.Ready) {
println("Ready")
}
fn on_message(mut bot &vcord.Bot, mut message &vcord.Message){
if message.content == '!ping' {
bot.create_message(message.channel_id, vcord.MessagePayload{
content: 'Pong!',
embeds: [
vcord.MessageEmbed{
title: 'Hello World',
color: 0x7289da,
description: 'This is a test'
}
]
}) or {}
}
}
This repository has been archived by the owner on Apr 13, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
[WIP] Discord API wrapper in V
License
CesiumLabs/vcord
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
[WIP] Discord API wrapper in V
Topics
Resources
License
Code of conduct
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published