272 lines
12 KiB
HTML
272 lines
12 KiB
HTML
<!DOCTYPE html>
|
|
<!--[if IE]><![endif]-->
|
|
<html>
|
|
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
|
<title>Class EventController
|
|
</title>
|
|
<meta name="viewport" content="width=device-width">
|
|
<meta name="title" content="Class EventController
|
|
">
|
|
|
|
<link rel="shortcut icon" href="../favicon.ico">
|
|
<link rel="stylesheet" href="../styles/docfx.vendor.min.css">
|
|
<link rel="stylesheet" href="../styles/docfx.css">
|
|
<link rel="stylesheet" href="../styles/main.css">
|
|
<meta property="docfx:navrel" content="../toc.html">
|
|
<meta property="docfx:tocrel" content="toc.html">
|
|
|
|
|
|
|
|
</head>
|
|
<body data-spy="scroll" data-target="#affix" data-offset="120">
|
|
<div id="wrapper">
|
|
<header>
|
|
|
|
<nav id="autocollapse" class="navbar navbar-inverse ng-scope" role="navigation">
|
|
<div class="container">
|
|
<div class="navbar-header">
|
|
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar">
|
|
<span class="sr-only">Toggle navigation</span>
|
|
<span class="icon-bar"></span>
|
|
<span class="icon-bar"></span>
|
|
<span class="icon-bar"></span>
|
|
</button>
|
|
|
|
<a class="navbar-brand" href="../index.html">
|
|
<img id="logo" class="svg" src="../logo.svg" alt="">
|
|
</a>
|
|
</div>
|
|
<div class="collapse navbar-collapse" id="navbar">
|
|
<form class="navbar-form navbar-right" role="search" id="search">
|
|
<div class="form-group">
|
|
<input type="text" class="form-control" id="search-query" placeholder="Search" autocomplete="off">
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
|
|
<div class="subnav navbar navbar-default">
|
|
<div class="container hide-when-search" id="breadcrumb">
|
|
<ul class="breadcrumb">
|
|
<li></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</header>
|
|
<div role="main" class="container body-content hide-when-search">
|
|
|
|
<div class="sidenav hide-when-search">
|
|
<a class="btn toc-toggle collapse" data-toggle="collapse" href="#sidetoggle" aria-expanded="false" aria-controls="sidetoggle">Show / Hide Table of Contents</a>
|
|
<div class="sidetoggle collapse" id="sidetoggle">
|
|
<div id="sidetoc"></div>
|
|
</div>
|
|
</div>
|
|
<div class="article row grid-right">
|
|
<div class="col-md-10">
|
|
<article class="content wrap" id="_content" data-uid="Discord.Controller.EventController">
|
|
|
|
|
|
|
|
<h1 id="Discord_Controller_EventController" data-uid="Discord.Controller.EventController" class="text-break">Class EventController
|
|
</h1>
|
|
<div class="markdown level0 summary"></div>
|
|
<div class="markdown level0 conceptual"></div>
|
|
<div class="inheritance">
|
|
<h5>Inheritance</h5>
|
|
<div class="level0"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
|
|
<div class="level1"><span class="xref">EventController</span></div>
|
|
</div>
|
|
<div class="inheritedMembers">
|
|
<h5>Inherited Members</h5>
|
|
<div>
|
|
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object)</a>
|
|
</div>
|
|
<div>
|
|
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object, object)</a>
|
|
</div>
|
|
<div>
|
|
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a>
|
|
</div>
|
|
<div>
|
|
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>
|
|
</div>
|
|
<div>
|
|
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone">object.MemberwiseClone()</a>
|
|
</div>
|
|
<div>
|
|
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object, object)</a>
|
|
</div>
|
|
<div>
|
|
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>
|
|
</div>
|
|
</div>
|
|
<h6><strong>Namespace</strong>: <span class="xref">Discord</span>.<a class="xref" href="Discord.Controller.html">Controller</a></h6>
|
|
<h6><strong>Assembly</strong>: Discord.dll</h6>
|
|
<h5 id="Discord_Controller_EventController_syntax">Syntax</h5>
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public static class EventController</code></pre>
|
|
</div>
|
|
<h3 id="methods">Methods
|
|
</h3>
|
|
|
|
|
|
<a id="Discord_Controller_EventController_ExecuteController_" data-uid="Discord.Controller.EventController.ExecuteController*"></a>
|
|
<h4 id="Discord_Controller_EventController_ExecuteController__1_System_String___System_String_System_Object_System_Reflection_Assembly_" data-uid="Discord.Controller.EventController.ExecuteController``1(System.String[],System.String,System.Object,System.Reflection.Assembly)">ExecuteController<T>(string[], string, object, Assembly)</h4>
|
|
<div class="markdown level1 summary"><p>Method To be placed in a separate Class that will be passed into the <a class="xref" href="Discord.Controller.EventController.html#Discord_Controller_EventController_InvokeEventControllerClass__2_System_String_System_Object_">InvokeEventControllerClass<CLASS, ENUM>(string, object)</a>
|
|
For the EventControllerAttribute you have to pass the enum type e.g. of all categories and pass the enum value for a specific category. Finally you have to execute the controller and use the category's enum for the generic.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
<h5 class="declaration">Declaration</h5>
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public static void ExecuteController<T>(string[] ids, string nspace, object e, Assembly execAssembly)</code></pre>
|
|
</div>
|
|
<h5 class="parameters">Parameters</h5>
|
|
<table class="table table-bordered table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Name</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a>[]</td>
|
|
<td><span class="parametername">ids</span></td>
|
|
<td><p>The given Ids without category enum.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
|
|
<td><span class="parametername">nspace</span></td>
|
|
<td><p>The namespace with all the required events. E.g. Project_Sipster.DiscordBarista.Function.Partnership.Events</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></td>
|
|
<td><span class="parametername">e</span></td>
|
|
<td><p>The passed event from the <a class="xref" href="Discord.Controller.EventController.html#Discord_Controller_EventController_InvokeEventControllerClass__2_System_String_System_Object_">InvokeEventControllerClass<CLASS, ENUM>(string, object)</a> - just needs to be put it as a param and passed over to the controller.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.reflection.assembly">Assembly</a></td>
|
|
<td><span class="parametername">execAssembly</span></td>
|
|
<td><p>The executing assembly. Get it via <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.reflection.assembly.getexecutingassembly">GetExecutingAssembly()</a></p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<h5 class="typeParameters">Type Parameters</h5>
|
|
<table class="table table-bordered table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Name</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="parametername">T</span></td>
|
|
<td><p>The enum of the category</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
|
|
<a id="Discord_Controller_EventController_InvokeEventControllerClass_" data-uid="Discord.Controller.EventController.InvokeEventControllerClass*"></a>
|
|
<h4 id="Discord_Controller_EventController_InvokeEventControllerClass__2_System_String_System_Object_" data-uid="Discord.Controller.EventController.InvokeEventControllerClass``2(System.String,System.Object)">InvokeEventControllerClass<CLASS, ENUM>(string, object)</h4>
|
|
<div class="markdown level1 summary"><p>To be executed by the Discord Events that use Ids.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
<h5 class="declaration">Declaration</h5>
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public static void InvokeEventControllerClass<CLASS, ENUM>(string ids, object e)</code></pre>
|
|
</div>
|
|
<h5 class="parameters">Parameters</h5>
|
|
<table class="table table-bordered table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Name</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
|
|
<td><span class="parametername">ids</span></td>
|
|
<td><p>Passed Ids by the event e.g e.Interaction.Data.CustomId</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></td>
|
|
<td><span class="parametername">e</span></td>
|
|
<td><p>The passed Event args</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<h5 class="typeParameters">Type Parameters</h5>
|
|
<table class="table table-bordered table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Name</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="parametername">CLASS</span></td>
|
|
<td><p>The class that should be looked in by the controller, defined by using <see cref="!:ExecuteController<T>(string[], string, object)"></see></p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><span class="parametername">ENUM</span></td>
|
|
<td><p>The base enum that will get separated and passed to the actual controller</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
</article>
|
|
</div>
|
|
|
|
<div class="hidden-sm col-md-2" role="complementary">
|
|
<div class="sideaffix">
|
|
<div class="contribution">
|
|
<ul class="nav">
|
|
</ul>
|
|
</div>
|
|
<nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
|
|
<h5>In This Article</h5>
|
|
<div></div>
|
|
</nav>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<footer>
|
|
<div class="grad-bottom"></div>
|
|
<div class="footer">
|
|
<div class="container">
|
|
<span class="pull-right">
|
|
<a href="#top">Back to top</a>
|
|
</span>
|
|
|
|
<span>Generated by <strong>DocFX</strong></span>
|
|
</div>
|
|
</div>
|
|
</footer>
|
|
</div>
|
|
|
|
<script type="text/javascript" src="../styles/docfx.vendor.min.js"></script>
|
|
<script type="text/javascript" src="../styles/docfx.js"></script>
|
|
<script type="text/javascript" src="../styles/main.js"></script>
|
|
</body>
|
|
</html>
|