/dreamers rules
This commit is contained in:
		@@ -290,10 +290,16 @@ final class index extends core
 | 
				
			|||||||
			$discord->application->commands->save(new command($discord, [
 | 
								$discord->application->commands->save(new command($discord, [
 | 
				
			||||||
				'name' => 'dreamers',
 | 
									'name' => 'dreamers',
 | 
				
			||||||
				'description' => 'BEBRA DREAMERS',
 | 
									'description' => 'BEBRA DREAMERS',
 | 
				
			||||||
				'options' => [(new option($discord))
 | 
									'options' => [
 | 
				
			||||||
					->setName('invite')
 | 
										(new option($discord))
 | 
				
			||||||
					->setDescription('Send an invitation link to "BEBRA DREAMERS"')
 | 
											->setName('invite')
 | 
				
			||||||
					->setType(option::SUB_COMMAND)]
 | 
											->setDescription('Link to "BEBRA DREAMERS"')
 | 
				
			||||||
 | 
											->setType(option::SUB_COMMAND),
 | 
				
			||||||
 | 
										(new option($discord))
 | 
				
			||||||
 | 
											->setName('rules')
 | 
				
			||||||
 | 
											->setDescription('Rules of "BEBRA DREAMERS"')
 | 
				
			||||||
 | 
											->setType(option::SUB_COMMAND)
 | 
				
			||||||
 | 
									]
 | 
				
			||||||
			]));
 | 
								]));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			$discord->listenCommand(['dreamers', 'invite'], function (interaction $interaction) {
 | 
								$discord->listenCommand(['dreamers', 'invite'], function (interaction $interaction) {
 | 
				
			||||||
@@ -303,6 +309,15 @@ final class index extends core
 | 
				
			|||||||
				// Отправка ссылки с приглашением присоединиться на сервер BEBRA DREAMERS
 | 
									// Отправка ссылки с приглашением присоединиться на сервер BEBRA DREAMERS
 | 
				
			||||||
				if ($interaction->data->options->has('invite')) $interaction->respondWithMessage(_message::new()->setContent('https://discord.bebra.team'));
 | 
									if ($interaction->data->options->has('invite')) $interaction->respondWithMessage(_message::new()->setContent('https://discord.bebra.team'));
 | 
				
			||||||
			});
 | 
								});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								$discord->listenCommand(['dreamers', 'rules'], function (interaction $interaction) {
 | 
				
			||||||
 | 
									// Игнорирование чат-роботов
 | 
				
			||||||
 | 
									if ($interaction->user->bot) return;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
									// Отправка ссылки с приглашением присоединиться на сервер BEBRA DREAMERS
 | 
				
			||||||
 | 
									if ($interaction->data->options->has('rules')) $interaction->respondWithMessage(_message::new()->setContent('https://rules.bebra.team'));
 | 
				
			||||||
 | 
								});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		});
 | 
							});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		$this->discord->run();
 | 
							$this->discord->run();
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user