flags

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2023 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Note that while types.go is autogenerated, this file is NOT and is manually maintained

Revolt does not provide bitflags so this file is used to provide a similar interface

Index

Constants

View Source
const (
	// User has been suspended from the platform
	SUSPENDED_UserFlag = 1
	// User has deleted their account
	DELETED_UserFlag = 2
	// User was banned off the platform
	BANNED_UserFlag = 4
	// User was marked as spam and removed from platform
	SPAM_UserFlag = 8
)

Variables

This section is empty.

Functions

func HasFlag

func HasFlag(flags int64, flag int64) bool

Returns whether the user has the given flag

E.g. HasFlag(user.Flags, SUSPENDED_UserFlag)

Types

type BotFlag

type BotFlag = int64
const (
	VERIFIED_BotFlag BotFlag = 1
	OFFICIAL_BotFlag BotFlag = 2
)

type ServerFlag

type ServerFlag = int64
const (
	VERIFIED_ServerFlag ServerFlag = 1
	OFFICIAL_ServerFlag ServerFlag = 2
)

type UserFlag

type UserFlag uint64

Directories

Path Synopsis
Defines permissions flags, taken from https://github.com/revoltchat/backend/blob/master/crates/quark/src/permissions/defn/permission.rs
Defines permissions flags, taken from https://github.com/revoltchat/backend/blob/master/crates/quark/src/permissions/defn/permission.rs

Jump to

Keyboard shortcuts

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