DiscordPHP-BridgeBot Documentation

InstallCheck
in package

FinalYes

Reads the application's install settings back and says what is wrong with them, once, at startup.

Who can add the bot to a server is decided in the Developer Portal, not in this process — and it decides a great deal. Whoever can link a room in any server the bot is in can reach every Twitch channel and Telegram chat the bot can, so a bot anyone can add is a bot anyone can point at those rooms. The portal says nothing when it is left that way, so this does.

Pure: it takes the application as Discord returned it and hands back findings, so it can be tested without a connection.

Tags
author

Valithor Obsidion valithor@discordphp.org

Table of Contents

Constants

INFO  : mixed = 'info'
WARNING  : mixed = 'warning'
USER_INSTALL  : mixed = '1'
Discord's installation-context key for a user install.

Methods

review()  : array<int, array{level: string, message: string}>
allowsUserInstall()  : bool
info()  : array{level: string, message: string}
warning()  : array{level: string, message: string}
withoutQuery()  : string|null
`https://host/path`, or `null` when it is not an https URL.

Constants

USER_INSTALL

Discord's installation-context key for a user install.

private mixed USER_INSTALL = '1'

Methods

review()

public static review(object $application) : array<int, array{level: string, message: string}>
Parameters
$application : object

Discord's application object: a DiscordPHP Application part, or the raw payload.

Return values
array<int, array{level: string, message: string}>

allowsUserInstall()

private static allowsUserInstall(mixed $config) : bool
Parameters
$config : mixed
Return values
bool

info()

private static info(string $message) : array{level: string, message: string}
Parameters
$message : string
Return values
array{level: string, message: string}

warning()

private static warning(string $message) : array{level: string, message: string}
Parameters
$message : string
Return values
array{level: string, message: string}

withoutQuery()

`https://host/path`, or `null` when it is not an https URL.

private static withoutQuery(string $url) : string|null
Parameters
$url : string
Return values
string|null
On this page

Search results