discord

package
v0.0.23 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2021 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Overview

Package discord provides a discord bot to poll NDX contracts

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BaseEmbed

func BaseEmbed() *discordgo.MessageEmbed

BaseEmbed returns a base message embed type to be customized

func ParseValue added in v0.0.19

func ParseValue(num float64) string

ParseValue converts numbers like 10000000 into 10M

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client wraps bclient and discordgo to provide a discord bot for indexed finance

func NewClient

func NewClient(ctx context.Context, cfg *config.Config, bc *bclient.Client, db *db.Database, logger *zap.Logger) (*Client, error)

NewClient provides a wrapper around discordgo

func (*Client) Close

func (c *Client) Close() error

Close terminates the discordgo session

Jump to

Keyboard shortcuts

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