quotes

package
v0.0.0-...-0abf00b Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2023 License: AGPL-3.0 Imports: 25 Imported by: 0

Documentation

Overview

SPDX-License-Identifier: AGPL-3.0-only

SPDX-License-Identifier: AGPL-3.0-only

SPDX-License-Identifier: AGPL-3.0-only

SPDX-License-Identifier: AGPL-3.0-only

SPDX-License-Identifier: AGPL-3.0-only

SPDX-License-Identifier: AGPL-3.0-only

SPDX-License-Identifier: AGPL-3.0-only

SPDX-License-Identifier: AGPL-3.0-only

SPDX-License-Identifier: AGPL-3.0-only

SPDX-License-Identifier: AGPL-3.0-only

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decrypt

func Decrypt(ciphertext []byte, key [32]byte) (plaintext []byte, err error)

Decrypt decrypts data using 256-bit AES-GCM. This both hides the content of the data and provides a check that it hasn't been altered. Expects input form nonce|ciphertext|tag where '|' indicates concatenation.

func Encrypt

func Encrypt(plaintext []byte, key [32]byte) (ciphertext []byte, err error)

Encrypt encrypts data using 256-bit AES-GCM. This both hides the content of the data and provides a check that it hasn't been altered. Output takes the form nonce|ciphertext|tag where '|' indicates concatenation.

func Init

func Init(bot *bot.Bot) (s string, list []*bcr.Command)

Init ...

Types

type Bot

type Bot struct {
	*bot.Bot

	AESKey [32]byte
	// contains filtered or unexported fields
}

Bot ...

type Quote

type Quote struct {
	ID  int64
	HID string

	ServerID  discord.GuildID
	ChannelID discord.ChannelID
	MessageID discord.MessageID
	UserID    discord.UserID
	AddedBy   discord.UserID
	Content   string
	Proxied   bool

	Added time.Time
}

Quote is a single quote

func (Quote) Embed

func (q Quote) Embed(s *pkgo.Session) discord.Embed

Embed creates an embed for the quote

Jump to

Keyboard shortcuts

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