bots

package
v0.0.0-...-476d922 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2019 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Copyright (c) 2019 Romano (Viacoin developer) Distributed under the MIT software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterTelegramReceiver

func RegisterTelegramReceiver(username string) user.User

register user (not the person using the bot)

func RegisterTelegramSender

func RegisterTelegramSender(command Command) user.User

register the user who is using the bot

Types

type Command

type Command struct {
	Command string
	Params  []string
	From    *tgbotapi.User
}

type TelegramBot

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

func NewTelegramBot

func NewTelegramBot(api string) *TelegramBot

func (TelegramBot) Deposit

func (telegram TelegramBot) Deposit(command Command, update *tgbotapi.Update)

generate a unique public key for the user and send it in the chat deposit via

func (TelegramBot) Tip

func (telegram TelegramBot) Tip(command Command, update *tgbotapi.Update)

tip a user by the command /tip 1 via @Romanornr

func (TelegramBot) Update

func (telegram TelegramBot) Update()

func (TelegramBot) Withdraw

func (telegram TelegramBot) Withdraw(command Command, update *tgbotapi.Update)

withdraw funds by using the command /withdraw 2.5 VdMPvn7vUTSzbYjiMDs1jku9wAh1Ri2Y1A the bot will reply with a blockexplorer link to the transaction id.

Jump to

Keyboard shortcuts

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