56 lines
1.4 KiB
PHP
56 lines
1.4 KiB
PHP
<?php
|
|
|
|
namespace Kanboard\Plugin\Discord;
|
|
|
|
use Kanboard\Core\Translator;
|
|
use Kanboard\Core\Plugin\Base;
|
|
|
|
/**
|
|
* Discord Plugin
|
|
*
|
|
* @package discord
|
|
* @author Ryonez Coruscare
|
|
*/
|
|
class Plugin extends Base
|
|
{
|
|
public function initialize()
|
|
{
|
|
$this->template->hook->attach('template:config:integrations', 'discord:config/integration');
|
|
$this->template->hook->attach('template:project:integrations', 'discord:project/integration');
|
|
$this->template->hook->attach('template:user:integrations', 'discord:user/integration');
|
|
|
|
$this->userNotificationTypeModel->setType('discord', t('Discord'), '\Kanboard\Plugin\Discord\Notification\Discord');
|
|
$this->projectNotificationTypeModel->setType('discord', t('Discord'), '\Kanboard\Plugin\Discord\Notification\Discord');
|
|
}
|
|
|
|
public function onStartup()
|
|
{
|
|
Translator::load($this->languageModel->getCurrentLanguage(), __DIR__.'/Locale');
|
|
}
|
|
|
|
public function getPluginDescription()
|
|
{
|
|
return 'Receive notifications on Discord';
|
|
}
|
|
|
|
public function getPluginAuthor()
|
|
{
|
|
return 'Ryonez Coruscare';
|
|
}
|
|
|
|
public function getPluginVersion()
|
|
{
|
|
return '0.0.1';
|
|
}
|
|
|
|
public function getPluginHomepage()
|
|
{
|
|
return 'https://codelabs.alteria.xyz/ryonez/kanboard-discord';
|
|
}
|
|
|
|
public function getCompatibleVersion()
|
|
{
|
|
return '>=1.0.37';
|
|
}
|
|
}
|