core

package
v0.0.0-...-63c6847 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 9, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ApiUrl string = "http://cofy_api:3333"
View Source
var Prefix string = "c!"

command prefix used in all app

Functions

This section is empty.

Types

type BaseCommand

type BaseCommand struct {
	Name        string
	Aliases     []string
	Description string
}

the command struct, with essential informations

type Gains

type Gains struct {
	Coins int `json:"coins"`
	Xp    int `json:"xp"`
	Level int `json:"level"`
}

type ICommand

type ICommand interface {
	Execute(s *discordgo.Session, m *discordgo.MessageCreate)
	Help(s *discordgo.Session, m *discordgo.MessageCreate)
}

the command interface, with custom methods

type User

type User struct {
	Id        uint      `json:"id"`
	DiscordId int       `json:"discord_id"`
	Name      string    `json:"name"`
	Coins     int       `json:"coins"`
	Xp        int       `json:"xp"`
	Level     int       `json:"level"`
	CreatedAt time.Time `json:"created_at"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL