Skip to content

Commit

Permalink
Projektdateien hinzufügen.
Browse files Browse the repository at this point in the history
  • Loading branch information
FabioGaming committed May 8, 2024
1 parent 29c0d66 commit 034cb9e
Show file tree
Hide file tree
Showing 9 changed files with 226 additions and 0 deletions.
25 changes: 25 additions & 0 deletions Amino.NET.Interactions.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.8.34330.188
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Amino.NET.Interactions", "Amino.NET.Interactions\Amino.NET.Interactions.csproj", "{A276DEEE-67F4-413E-AD98-9682115EF271}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{A276DEEE-67F4-413E-AD98-9682115EF271}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A276DEEE-67F4-413E-AD98-9682115EF271}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A276DEEE-67F4-413E-AD98-9682115EF271}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A276DEEE-67F4-413E-AD98-9682115EF271}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {02D099D6-D8D6-47C0-9C42-D03D37F8D53F}
EndGlobalSection
EndGlobal
13 changes: 13 additions & 0 deletions Amino.NET.Interactions/Amino.NET.Interactions.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Amino.NET" Version="1.6.0" />
</ItemGroup>

</Project>
24 changes: 24 additions & 0 deletions Amino.NET.Interactions/Attributes/Command.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Amino.Interactions.Attributes
{
public class Command : Attribute
{
public string CommandName { get; }
public string CommandDescription { get; }
public string CommunityId { get; }

public Command(string commandName, string commandDescription = null, string communityId = null)
{
this.CommandName = commandName;
this.CommunityId = communityId;
this.CommandDescription = commandDescription;
}


}
}
18 changes: 18 additions & 0 deletions Amino.NET.Interactions/Attributes/EnabledInDms.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Amino.Interactions.Attributes
{
public class EnabledInDms : Attribute
{
public bool IsEnabledInDms { get; } = true;

public EnabledInDms(bool isEnabledInDms)
{
IsEnabledInDms = isEnabledInDms;
}
}
}
28 changes: 28 additions & 0 deletions Amino.NET.Interactions/Attributes/PermissionGroup.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Amino.Interactions.Attributes
{
public class PermissionGroup
{
public enum PermissionGroups
{
All,
Chat_Staff,
Staff,
Curator,
Leader,
Agent
}

public PermissionGroups RequiredPermission { get; set; } = PermissionGroups.All;

public PermissionGroup(PermissionGroups permissionGroup)
{
this.RequiredPermission = permissionGroup;
}
}
}
15 changes: 15 additions & 0 deletions Amino.NET.Interactions/InteractionBase.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Amino.Interactions
{
public class InteractionBase
{
public Objects.Interaction Context;


}
}
71 changes: 71 additions & 0 deletions Amino.NET.Interactions/InteractionsClient.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;

namespace Amino.Interactions
{
public partial class InteractionsClient
{

public Dictionary<string, Objects.InteractionModule> InteractionModules;
public Queue<Objects.Interaction> InteractionQueue;

public enum LogLevels
{
None,
Debug,
Warning,
Error
}

private Amino.Client AminoClient;
public int InteractionCooldown = 2000;
public string InteractionPrefix = "/";
public bool IgnoreSelf = true;
public LogLevels LogLevel = LogLevels.None;



public InteractionsClient(Amino.Client client)
{
this.AminoClient = client;
this.InteractionQueue = new Queue<Objects.Interaction>();
this.InteractionModules = new Dictionary<string, Objects.InteractionModule>();
_ = Task.Run(async () => { HandleInteractionQueue(); });
}


public Task RegisterModule<T>() where T : InteractionBase
{

}

public Task RegisterModules(Assembly entrypoint)
{

}

public bool HandleInteraction(Objects.Interaction interaction)
{

}

private async Task HandleInteractionQueue()
{
while(true)
{
if(InteractionQueue.Count != 0)
{
HandleInteraction(InteractionQueue.Dequeue());
}
await Task.Delay(this.InteractionCooldown);
}
}


}
}
20 changes: 20 additions & 0 deletions Amino.NET.Interactions/Objects/Interaction.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Amino.Interactions.Objects
{
public class Interaction
{
public string InteractionChatId { get; set; }
public string InteractionName { get; set; }
public Amino.Client AminoClient { get; set; }
public Objects.InteractionModule BaseModule { get; set; }
public Amino.Objects.Message Message { get; set; }
public long InteractionTimestamp { get; set; }
public string InteractionId { get; set; }

}
}
12 changes: 12 additions & 0 deletions Amino.NET.Interactions/Objects/InteractionModule.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Amino.Interactions.Objects
{
public class InteractionModule
{
}
}

0 comments on commit 034cb9e

Please sign in to comment.