First Version 6

This commit is contained in:
adator
2024-11-01 23:52:22 +01:00
parent 860e265979
commit 9d9ede0e80
27 changed files with 3331 additions and 2432 deletions

View File

@@ -1,5 +1,8 @@
from typing import TYPE_CHECKING
from dataclasses import dataclass, fields
from core.irc import Irc
if TYPE_CHECKING:
from core.irc import Irc
class Test():
@@ -10,7 +13,7 @@ class Test():
param_exemple1: str
param_exemple2: int
def __init__(self, ircInstance:Irc) -> None:
def __init__(self, ircInstance: 'Irc') -> None:
# Module name (Mandatory)
self.module_name = 'mod_' + str(self.__class__.__name__).lower()
@@ -18,6 +21,12 @@ class Test():
# Add Irc Object to the module (Mandatory)
self.Irc = ircInstance
# Add Loader Object to the module (Mandatory)
self.Loader = ircInstance.Loader
# Add server protocol Object to the module (Mandatory)
self.Protocol = ircInstance.Protocol
# Add Global Configuration to the module (Mandatory)
self.Config = ircInstance.Config
@@ -33,6 +42,9 @@ class Test():
# Add Channel object to the module (Mandatory)
self.Channel = ircInstance.Channel
# Add Reputation object to the module (Optional)
self.Reputation = ircInstance.Reputation
# Create module commands (Mandatory)
self.commands_level = {
0: ['test-command'],