winglessraven / amp-discord-bot Goto Github PK
View Code? Open in Web Editor NEWDiscord Bot plugin for AMP
Discord Bot plugin for AMP
Describe the solution you'd like
A clear and concise description of what you want to happen.
Basically an implementation that does not require a developer license. Although we are granted one, having multiple instances requires multiple dev licenses, which is a lot. If there is a way to manage this without requiring it.
Additional context
Add any other context or screenshots about the feature request here.
Describe the bug
If the bot is in multiple servers and a channel doesn't exist in one for logs/events then the bot can fail to post the message on a server that the channel does exist on.
To Reproduce
Steps to reproduce the behaviour:
Expected behaviour
Should skip over the server it doesn't exist in and post in the server it does
Screenshots
N/A
AMP Instance Info (please complete the following information):
Additional context
None
Was wondering if it would be possible to add in auto messages that delete after a certain amount of time to announce things.
So lets say you restart the game server every 12 hours, the bot then announces the restart 5min before the restart, deletes the chat and posts a new one when there is 3min left of the timer and does the same when there is 1min left.
Hi, I've been a huge fan of this Cubecoders AMP Plugin as it gives so much QoL to the game servers' environments. Sadly (and it's not the first time), after an AMP update the Plugin very much "disappears" from the GUI. The folders and files are there, but AMP seems to not be able to initialize it. It happened before but the server was hosted on a Windows 10 Home machine and I thought it was just too many errors building up. This time, though, the server is hosted on an Ubuntu VM and so far worked flawlessly. I'll copy the error I managed to retrieve from the machine CLI as it can (maybe) provide more information and be more specific than I was.
Thank you in advance! And Merry Christmas (if you celebrate) and Happy Holidays!
At the time of the exception, the container was:
Resolving DiscordBotPlugin.PluginMain,(none)
Calling constructor DiscordBotPlugin.PluginMain(ModuleShared.ILogger log, ModuleShared.IConfigSerializer config, ModuleShared.IPlatformInfo platform, ModuleShared.IRunningTasksManager taskManager, ModuleShared.IApplicationWrapper Application, ModuleShared.IAMPInstanceInfo AMPInstanceInfo)
[10:57:52] [ModuleLoader Fatal] : 'DiscordBotPlugin' does not implement abstract class 'ModuleShared.AMPPlugin'
[10:57:52] [ModuleLoader Error] : Could not load plugin DiscordBotPlugin
Describe the bug
Slash command cause an error in the application
To Reproduce
Steps to reproduce the behaviour:
configure discord bot in AMP and on Discord server
Bot is connected
run "/info" in text channel
discord will time out with "The application did not respond"
Expected behaviour
Some manner of info panel
AMP Instance Info (please complete the following information):
Additional context
It's entirely possible I've missed something (not a case of it having worked previously, new setup)
Describe the bug
The bot configuration options do not show up with a new Valheim instance in AMP. An option named Discord Bot:Smart_toy will show but it has no parameters. No errors showing in log.
To Reproduce
Steps to reproduce the behaviour:
Expected behaviour
Discord Bot configuration options to be present and configurable in the UI
AMP Instance Info (please complete the following information):
Additional context
I have used this bot on all my other instances including a Valheim instance in the past and have not had this issue before
[09:57:59] [Program Info/1] : Starting AMP version 2.5.0.14 (Callisto), built 14/06/2024 03:45
[09:57:59] [Program Info/1] : Stream: Mainline / Release - built by CUBECODERS/buildbot on CCL-DEV
[09:57:59] [Core Warning/1] : Current time zone is set to New Zealand Standard Time - It is recommended you switch to UTC+0 to avoid time-zone related issues
[09:57:59] [Program Info/1] : OS: Windows / x86_64
[09:57:59] [Program Info/1] : CPU: Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz (4C/8T)
[09:57:59] [Program Info/1] : RAM: 16256MB
[09:57:59] [Program Info/1] : AMP Instance ID: cc741ab0-793b-45b6-86a9-125e70bf17b8
[09:58:00] [Loader Info/1] : Loaded GenericModule version 1.0.0.0 by CubeCoders Limited
[09:58:00] [Core Info/1] : Metrics publishing is enabled at udp://localhost:12820.
[09:58:00] [Loader Info/1] : Loaded FileManagerPlugin by CubeCoders Limited
[09:58:00] [Loader Info/1] : Loaded EmailSenderPlugin by CubeCoders Limited
[09:58:00] [Loader Info/1] : Loaded WebRequestPlugin by CubeCoders Limited
[09:58:00] [Loader Info/1] : Loaded LocalFileBackupPlugin by CubeCoders Limited
[09:58:00] [Loader Info/1] : Loaded CommonCorePlugin by CubeCoders Limited
[09:58:00] [Core Error/1] : CryptographicException
[09:58:00] [Core Error/1] : [0] (CryptographicException) : Cannot find the requested object.
[09:58:00] [Core Error/1] : at Security.Cryptography.CryptographicException.ThrowCryptographicException(Int32 hr)
at Security.Cryptography.X509Certificates.X509Utils._QueryCertFileType(String fileName)
at Security.Cryptography.X509Certificates.X509Certificate.LoadCertificateFromFile(String fileName, Object password, X509KeyStorageFlags keyStorageFlags)
at GSMyAdmin.SignatureVerification.Verify_Windows(String Filename)
[09:58:01] [Loader Info/1] : Loaded DiscordBotPlugin by winglessraven
[09:58:01] [Loader Info/1] : GenericModule requests dependency steamcmdplugin...
[09:58:01] [Loader Info/1] : Loaded steamcmdplugin by CubeCoders Limited
[09:58:01] [Loader Info/1] : GenericModule requests dependency RCONPlugin...
[09:58:01] [Loader Info/1] : Loaded RCONPlugin by CubeCoders Limited
[09:58:01] [Core Info/1] : Licence Present: AMP Professional Edition
[09:58:01] [Core Info/1] : Licence Present: AMP Developer Edition
[09:58:01] [FileManager Notice/1] : Using keypair with fingerprint 64YmL6rvrJgRB30qS6Zhaz+tx67FGX1f0mak2rNRyJU=
[09:58:01] [FileManager Info/1] : SFTP Server started on 192.168.10.227:4508
[09:58:01] [Webserver Info/1] : Websockets are enabled.
[09:58:01] [Webserver Info/1] : Webserver started on http://192.168.10.227:4503
[09:58:01] [Webserver Info/13] : RouterTimer@10Hz with 2 jobs started
[09:58:01] [Core Info/1] : Checking for AMP updates...
[09:58:03] [Core Info/10] : AMP is up to date.
[09:58:12] [Core Activity/10] : Authentication attempt for user admin from 192.168.10.227
[09:58:13] [Core Activity/9] : Authentication success
The bot can start stop restart and see the status of the server but everytime i try to get it to show the server info panel it says the application did not respond
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behaviour:
Setting up on a windows 2022 server following all instructions to completion, the discord bot did not display in the Instance > Configuration menu. There were no apparent errors in either console (primary AMP console nor the target game instance console)
After some investigation I identfied the following error(s)
[00:02:42] [Core Error] : at Security.Cryptography.CryptographicException.ThrowCryptographicException(Int32 hr)
at Security.Cryptography.X509Certificates.X509Utils._QueryCertFileType(String fileName)
at Security.Cryptography.X509Certificates.X509Certificate.LoadCertificateFromFile(String fileName, Object password, X509KeyStorageFlags keyStorageFlags)
at GSMyAdmin.SignatureVerification.Verify_Windows(String Filename)
[00:02:42] [ModuleLoader Error] : Missing plugin/assembly: Newtonsoft.Json (D:\AMPDatastore\Instances\ModsTestingInstance\Plugins\DiscordBotPlugin\Newtonsoft.Json.dll)
...
...
[00:02:42] [ModuleLoader Error] : Unable to load plugin DiscordBotPlugin: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
[00:02:42] [ModuleLoader Error] : Could not load plugin DiscordBotPlugin
I was able to resolve the issue via manually downloading Newtonsoft.Json.dll 13.0.1 via nuget and placing the missing dependency within the DiscordBotPlugin folder, along side the DiscordBotPlugin.dll
The Menu item is now displaying as expected within the instance configuration menu.
(It is late and I've spent a few hours on this so time for bed. If there are downstream issues configuring and connecting the bot itself I will edit and/or reply with findings and relevant information.)
AMP Instance Info (please complete the following information):
AMP Release "Triton"
v2.3.2.10, built 21/04/2022 15:09
Host OS and Module: Windows Server 2022 ADS Instance
Target Instance:
Additional context
Suggest one of the following:
Describe the bug
No bot control in Configuration screen after installing.. same as #97
To Reproduce
Steps to reproduce the behaviour:
Expected behaviour
Discord bot config to be there
AMP Instance Info (please complete the following information):
Hi,
my AMP is only available via HTTP but the Manage button gives a HTTPS link. Is it possible to change that?
Hey,
somehow I can't seem to find the Discord Bot button in my configuration of the instance.
I applied the Dev-Key to the instance and it also said that the module has been loaded in the AMP_Logs:
[12:51:42] [ModuleLoader Info] : Loaded DiscordBotPlugin version 1.0.0.0 by CubeCoders Limited
And then having some other Core Errors (not sure if those are an issue)
[12:51:42] [Core Info] : Licence Present: AMP Developer Edition (Licenced to REMOVED FOR SECURITY REASONS)
[12:51:42] [FileManager Error] : Failure loading existing SSH keypair.
[12:51:42] [Core Error] : CryptographicException
[12:51:42] [Core Error] : [0] (CryptographicException) : Invalid key format - bad character.
[12:51:42] [Core Error] : at Rebex.Security.Cryptography.Pkcs.PrivateKeyInfo.nuuvx (Byte[] p0, Int32 p1, Rebex.Security.Cryptography.Pkcs.PrivateKeyInfo+tqlcf& p2, Rebex.Security.Certificates.KeyAlgorithm& p3, String& p4)
at Rebex.Security.Cryptography.Pkcs.PrivateKeyInfo.Load (IO.Stream input, String password)
at Rebex.Net.SshPrivateKey.wqskt (IO.Stream p0, String p1)
at Rebex.Net.SshPrivateKey..ctor (Byte[] data, String password)
at FileManagerPlugin.PluginMain.GetKey ()
[12:51:42] [FileManager Notice] : No SSH keypair available for embedded server, generating new keypair...
[12:51:42] [FileManager Notice] : Generated new keypair with fingerprint REMOVED FOR SECURITY REASONS
[12:51:42] [FileManager Notice] : Using keypair with fingerprint REMOVED FOR SECURITY REASONS
[12:51:42] [FileManager Info] : SFTP Server started on 0.0.0.0:2226
[12:51:42] [Core Error] : A developer licence alone is not sufficient to start AMP.
I flushed the browsers cache, still can't seem to find it.
Am I doing something wrong here?
When attempting to launch an Instance with the bot installed, they will fail to launch and hang until stopped with no GUI error, error in logs state AMP was not updated correctly.
All DiscordBot .dll versions result in the same error.
Follow steps until Configure Your Discord Bot in the configuration section
Instance restarts and is manageable, Discord Bot options become visible in the left-hand Instance Configuration menu.
Additional context
Attached are logs from AMP. "SUCCESS" runs AMP Instance with only DiscordBot .dll and .conf line removed. "FAIL" runs AMP Instance with only DiscordBot .dll and .conf line installed. All files moved/edited using AMP File Manager.
AMPLOG 2023-10-06 05-43-03_FAIL.log
AMPLOG 2023-10-06 05-44-03_SUCCESS.log
Unsure if this is an issue with the DiscordBot itself, or if the recent AMP update broke something the bot relies on, but figured I'd report to be safe.
Describe the bug
To Reproduce
Steps to reproduce the behaviour:
Expected behaviour
Information to populate
AMP Instance Info (please complete the following information):
Additional context
I initially forgot to check application.commands, re-added the bot with the proper permissions and even tried adding as administrator. Not sure if I'm doing something completely wrong 😄
Gateway A SlashCommandExecuted handler has thrown an unhandled exception.: System.NullReferenceException: Object reference not set to an instance of an object. at DiscordBotPlugin.PluginMain.d__24.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.GetResult() at DiscordBotPlugin.PluginMain.d__44.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.ConfiguredTaskAwaitable.ConfiguredTaskAwaiter.GetResult() at Discord.EventExtensions.d__1`1.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.ConfiguredTaskAwaitable.ConfiguredTaskAwaiter.GetResult() at Discord.WebSocket.DiscordSocketClient.d__172.MoveNext()
I would like to see an additional panel option that does not have the restart/kill buttons etc but allows discord users to see online players/server information/play time leader board.
only having the red circled section but not the blue section.
This would allow you to have a panel that allows for server controls and then an additional panel for the users where they can just see some information but not control the server.
Hello, I think everything is explained in the text bellow
To Reproduce
Steps to reproduce the behaviour:
Expected behaviour
Info panel to show up
AMP Instance Info (please complete the following information):
Additional context
[06:15:18] [DiscordBot Info] : 07:15:18 Gateway Disconnecting
[06:15:18] [DiscordBot Info] : 07:15:18 Gateway Disconnected
[06:15:23] [DiscordBot:malvi Info] : 07:15:23 Gateway A SlashCommandExecuted handler has thrown an unhandled exception.:
Discord.Net.HttpException: The server responded with error 50001: Missing Access
at Discord.Net.Queue.RequestBucket.SendAsync (Discord.Net.Queue.RestRequest request) [0x00559] in :0
at Discord.Net.Queue.RequestQueue.SendAsync (Discord.Net.Queue.RestRequest request) [0x0010e] in :0
at Discord.API.DiscordRestApiClient.SendInternalAsync (System.String method, System.String endpoint, Discord.Net.Queue.RestRequest request) [0x00157] in :0
at Discord.API.DiscordRestApiClient.SendJsonAsync[TResponse] (System.String method, System.String endpoint, System.Object payload, Discord.Net.BucketId bucketId, Discord.Net.Queue.ClientBucketType clientBucket, Discord.RequestOptions options) [0x000e9] in :0
at Discord.API.DiscordRestApiClient.CreateMessageAsync (System.UInt64 channelId, Discord.API.Rest.CreateMessageParams args, Discord.RequestOptions options) [0x001c1] in :0
at Discord.Rest.ChannelHelper.SendMessageAsync (Discord.IMessageChannel channel, Discord.Rest.BaseDiscordClient client, System.String text, System.Boolean isTTS, Discord.Embed embed, Discord.AllowedMentions allowedMentions, Discord.MessageReference messageReference, Discord.MessageComponent components, Discord.ISticker[] stickers, Discord.RequestOptions options, Discord.Embed[] embeds, Discord.MessageFlags flags) [0x004a2] in :0
at DiscordBotPlugin.PluginMain.GetServerInfo (System.Boolean updateExisting, Discord.WebSocket.SocketSlashCommand msg, System.Boolean Buttonless) [0x012a3] in :0
at DiscordBotPlugin.PluginMain.SlashCommandHandler (Discord.WebSocket.SocketSlashCommand command) [0x00727] in :0
at Discord.EventExtensions.InvokeAsync[T] (Discord.AsyncEvent1[T] eventHandler, T arg) [0x000a0] in <f655f03e4a954a9594739c0bf97f1824>:0 at Discord.WebSocket.DiscordSocketClient.TimeoutWrap (System.String name, System.Func
1[TResult] action) [0x001d6] in :0
[06:16:18] [DiscordBot Info] : 07:16:18 Gateway Connecting
[06:16:18] [DiscordBot Info] : 07:16:18 Gateway Discord.Net.HttpException: The server responded with error 401: 401: Unauthorized
at Discord.Net.Queue.RequestBucket.SendAsync (Discord.Net.Queue.RestRequest request) [0x00559] in :0
at Discord.Net.Queue.RequestQueue.SendAsync (Discord.Net.Queue.RestRequest request) [0x0010e] in :0
at Discord.API.DiscordRestApiClient.SendInternalAsync (System.String method, System.String endpoint, Discord.Net.Queue.RestRequest request) [0x00157] in :0
at Discord.API.DiscordRestApiClient.SendAsync[TResponse] (System.String method, System.String endpoint, Discord.Net.BucketId bucketId, Discord.Net.Queue.ClientBucketType clientBucket, Discord.RequestOptions options) [0x000c9] in :0
at Discord.API.DiscordRestApiClient.GetBotGatewayAsync (Discord.RequestOptions options) [0x000bf] in :0
at Discord.API.DiscordSocketApiClient.ConnectInternalAsync () [0x00180] in :0
at Discord.API.DiscordSocketApiClient.ConnectInternalAsync () [0x002dd] in :0
at Discord.API.DiscordSocketApiClient.ConnectAsync () [0x000ef] in :0
at Discord.WebSocket.DiscordSocketClient.OnConnectingAsync () [0x001d1] in :0
at Discord.ConnectionManager.ConnectAsync (System.Threading.CancellationTokenSource reconnectCancelToken) [0x0035c] in :0
at Discord.ConnectionManager+<>c__DisplayClass29_0.b__0 () [0x000d0] in :0
[06:16:18] [DiscordBot Info] : 07:16:18 Gateway Disconnecting
[06:16:18] [DiscordBot Info] : 07:16:18 Gateway Disconnected
Describe the bug
info panel display sections only show the first word in a player name when the name contains one or more spaces
To Reproduce
Expected behaviour
Names for joined players or top players by play time to contain full names including spaces
AMP Instance Info (please complete the following information):
Additional context
As I'm fairly new to AMP I can't say if it's AMP or the discord bot.
If it makes any difference I'm seeing this on palworld but not tried other games
02:07:25
Loaded ADSModule version 1.0.0.0 by CubeCoders Limited
Loaded FileManagerPlugin version 1.0.0.0 by CubeCoders Limited
Loaded EmailSenderPlugin version 1.0.0.0 by CubeCoders Limited
Loaded WebRequestPlugin version 1.0.0.0 by CubeCoders Limited
Loaded LocalFileBackupPlugin version 1.0.0.0 by CubeCoders Limited
Loaded CommonCorePlugin version 1.0.0.0 by CubeCoders Limited
CryptographicException
[0] (CryptographicException) : Das angeforderte Objekt wurde nicht gefunden.
at Security.Cryptography.CryptographicException.ThrowCryptographicException(Int32 hr) at Security.Cryptography.X509Certificates.X509Utils._QueryCertFileType(String fileName) at Security.Cryptography.X509Certificates.X509Certificate.LoadCertificateFromFile(String fileName, Object password, X509KeyStorageFlags keyStorageFlags) at GSMyAdmin.SignatureVerification.Verify_Windows(String Filename)
Unable to load plugin DiscordBotPlugin: Could not load file or assembly 'DiscordBotPlugin' or one of its dependencies. Failure during Cryptographic operation. (Exception from HRESULT: 0x80131430)
Could not load plugin DiscordBotPlugin
ADSModule requests dependency InstanceManagerPlugin...
02:07:26
Loaded InstanceManagerPlugin version 1.0.0.0 by CubeCoders Limited
ADSModule requests dependency SystemUserManagerPlugin...
Loaded SystemUserManagerPlugin version 1.0.0.0 by CubeCoders Limited
Loaded steamcmdplugin version 1.0.0.0 by CubeCoders Limited
Metrics server started OK on port 12820
Using keypair with fingerprint oai5JtFNC31m74AiilpceJ6EwSuA2rzmJ0Jz+X4ylFM=
SFTP Server started on 0.0.0.0:2223
02:07:27
Websockets are enabled.
Webserver started on http://0.0.0.0:8080
RouterTimer@10Hz with 2 jobs started
Checking for AMP updates...
AMP is up-to-date.
I would love the feature that if a player chats in the game it will get synced to the discord and if someone chats in the discord it will get synced to the game
Describe the solution you'd like
possibility to add other buttons manually/by default
such as gamemode, difficulty, weather,
reason being the console stuff doesnt work with BDS servers so i think this would be a good solution
Installed the Discord bot into a fresh non-ads instance for 7 days to die, the module refused to load despite it working in my other instance.
amp version : v2.4.5.4
OS: Windows
Docker : NO
VM : NO
Plugin version : V2.4.5
error:
[16:02:46] [Core Error] : CryptographicException
[16:02:46] [Core Error] : [0] (CryptographicException) : Cannot find the requested object.
[16:02:46] [Core Error] : at Security.Cryptography.CryptographicException.ThrowCryptographicException(Int32 hr)
at Security.Cryptography.X509Certificates.X509Utils._QueryCertFileType(String fileName)
at Security.Cryptography.X509Certificates.X509Certificate.LoadCertificateFromFile(String fileName, Object password, X509KeyStorageFlags keyStorageFlags)
at GSMyAdmin.SignatureVerification.Verify_Windows(String Filename)
[16:02:46] [Loader Error] : Unable to load plugin DiscordBotPlugin: Could not load file or assembly 'DiscordBotPlugin' or one of its dependencies. Failure during Cryptographic operation. (Exception from HRESULT: 0x80131430)
[16:02:46] [Loader Error] : Could not load plugin DiscordBotPlugin
[12:13:51] [ModuleLoader Info] ???: Loaded DiscordBotPlugin version 1.0.0.0 by CubeCoders Limited
Load perfect in instance and have DiscordBotPlugin.kvp in filesystem of Instance, but don't see config panel.
I restart all AMP Instance, Server Instance anddon't show panel in web admin.
Hi.
I think i did everything described in the readme but i am not sure if i did it right.
I am currently running AMP on a Windows PC
My AMPConfig.conf of my Minecraft Instance looks like that:
AMP.LoadPlugins=["FileManagerPlugin","EmailSenderPlugin","WebRequestPlugin","LocalFileBackupPlugin","CommonCorePlugin","DiscordBotPlugin"]
And i also added a folder with the DLL in it.
I also changed the license key to a dev key i hope. It did say done
Describe the bug
While using the bot, AMP throws an error message as the bot sends requests to AMP. This is the error message. AMP is hosted in a local vm. I've attempted on both linux and windows with the same outcome.
Gateway A SlashCommandExecuted handler has thrown an unhandled exception.: System.NullReferenceException: Object reference not set to an instance of an object at DiscordBotPlugin.PluginMain.GetServerInfo (System.Boolean updateExisting, Discord.WebSocket.SocketSlashCommand msg, System.Boolean Buttonless) [0x00075] in <cfd83e9e94c842678448dbfcc025904d>:0 at DiscordBotPlugin.PluginMain.SlashCommandHandler (Discord.WebSocket.SocketSlashCommand command) [0x0177d] in <cfd83e9e94c842678448dbfcc025904d>:0 at Discord.EventExtensions.InvokeAsync[T] (Discord.AsyncEvent
1[T] eventHandler, T arg) [0x000a0] in :0 at Discord.WebSocket.DiscordSocketClient.TimeoutWrap (System.String name, System.Func1[TResult] action) [0x001d6] in <cfd83e9e94c842678448dbfcc025904d>:0
It is not possible to create an info panel or use any other commands. The info command will make the bot display "The application did not respond", and the other commands will display the error message as seen above.
To Reproduce
Go through the usual installation process.
Expected behaviour
Clear communication between server and bot, so friends and I are able to remotely control whenever a game server should be running.
AMP Instance Info (please complete the following information):
Describe the solution you'd like
Would like to see a list of compatible games.
Additional context
Doesn't seem to be compatible with Satisfactory, I expected Satisfactory since its so new. Conan Exiles seems to be partially compatible.See the image attached for Conan Exiles.
Describe the bug
I'm doing this in Minecraft. Join/leave messages are turned on, and the channel ID is set to one where the bot does not have privileges.
To Reproduce
Steps to reproduce the behaviour:
Expected behaviour
Server is expected to simply give an error and remain unable to send messages.
[18:17:57] [Server thread/INFO]: GoldenCrepe joined the game
[23:17:57] [ErrorReporter Error] : Unhandled Exception: This will be automatically reported to the AMP developers.
[23:17:57] [ErrorReporter Error] : [Error] --- Begin Exception Data ---
[Error] OS: Linux (x86_64/None)
[Error] Module: MinecraftModule, Version: AMP 2.5.0.0
[Error] Release spec: Mainline - built by CUBECODERS/buildbot on CCL-DEV
[Error] Instance ID: 51633274-d146-4570-8e31-842b5fb1d140
[Error] HttpException
[Error] [0] (HttpException) : The server responded with error 50013: Missing Permissions
[Error] at Discord.Net.Queue.RequestBucket.SendAsync (Discord.Net.Queue.RestRequest request)
at Discord.Net.Queue.RequestQueue.SendAsync (Discord.Net.Queue.RestRequest request)
at Discord.API.DiscordRestApiClient.SendInternalAsync (String method, String endpoint, Discord.Net.Queue.RestRequest request)
at Discord.API.DiscordRestApiClient.SendJsonAsync[TResponse] (String method, String endpoint, Object payload, Discord.Net.BucketId bucketId, Discord.Net.Queue.ClientBucketType clientBucket, Discord.RequestOptions options)
at Discord.API.DiscordRestApiClient.CreateMessageAsync (UInt64 channelId, Discord.API.Rest.CreateMessageParams args, Discord.RequestOptions options)
at Discord.Rest.ChannelHelper.SendMessageAsync (Discord.IMessageChannel channel, Discord.Rest.BaseDiscordClient client, String text, Boolean isTTS, Discord.Embed embed, Discord.AllowedMentions allowedMentions, Discord.MessageReference messageReference, Discord.MessageComponent components, Discord.ISticker[] stickers, Discord.RequestOptions options, Discord.Embed[] embeds, Discord.MessageFlags flags)
at DiscordBotPlugin.PluginMain.UserJoins (Object sender, ModuleShared.UserEventArgs args)
[Error] --- End Exception Data ---
[Warning] Unsigned plugins are loaded: DiscordBotPlugin - error report will not be submitted.
AMP Instance Info:
Describe the solution you'd like
I'd like to be able to have the bot grab the latest join code, maybe from the console output of an instance, and display/update that join code within the server info message. It would also be awesome if we could pull the IP:Port info from that same console output to display, although this doesn't change as often as the join code, so typing it into the bot is fine.
Additional context
I'm using the bot on a Valheim instance with crossplay enabled. The join code is output within the console of the instance with text:
Session "[servername]" registered with join code ######
Retry join-code check 99
Session "[servername]" with join code ###### and IP ###.###.###.###:#### is active with # player(s)
Describe the bug
I've done a little bit of testing and it seems that all functions of the plugin work as described except the Player Join/Leave Messages.
I originally tested this with my Minecraft Forge 41.1.0 modded server, in which after setting up all the available options, I experienced an immediate AMP instance crash after I attempted to login. I initially thought it may be a mod I had causing a conflict, so to test, I created a new clean instance running Minecraft Forge 41.1.0 with no mods installed, went back through the DiscordBotPlugin installation steps, and attempted to join the server with the bot deactivated. This worked without issue. I then systematically enabled all the other options of DiscordBotPlugin, and testing in-between. No issues arose until I reached the aforementioned Player Join/Leave Messages option.
Once enabled, I experienced the above described issue. Only though when a channel name was given. I have ensured that my Discord server has said channel created and it's not private or modified in any way after creation.
I'm not positive that I'm not doing something incorrect, I would love some assistance, thanks!
To Reproduce
Steps to reproduce the behaviour:
Expected behaviour
A clear and concise description of what you expected to happen.
AMP Instance Info (please complete the following information):
Additional context
[15:30:25] [User Authenticator #2/INFO]: UUID of player Codename_11 is 853e1862-88ed-46e8-8018-486433420937
[15:30:26] [Server thread/INFO]: Using new advancement loading for net.minecraft.server.PlayerAdvancements@7d6ecfb2
[15:30:26] [Server thread/INFO]: Codename_11[/172.16.24.10:50181]: logged in with entity id 331 at (-63.58888183866694, 82.0, -52.754336705596906)
[15:30:26] [Server thread/INFO]: Codename_11 joined the game
[15:31:52] [API:admin Activity] : Changing setting DiscordBotPlugin.DiscordBotSettings.PostPlayerEventsChannel to minecraft
[15:32:00] [Server thread/INFO]: Codename_11 lost connection: Disconnected
[15:32:00] [Server thread/INFO]: Codename_11 left the game
[15:32:00] [ErrorReporter Error] : Unhandled Exception: Please report this to the AMP developers.
[15:32:00] [ErrorReporter Error] : [Error] --- Begin Exception Data ---
[Error] OS: Linux (x86_64/QEMU_KVM)
[Error] Module: MinecraftModule, Version: AMP 2.3.4.4
[Error] Release spec: Release - built by CUBECODERS/buildbot on CCL-DEV
[Error] Instance ID: d9355548-028d-463c-8a8c-d37d8894fd06
[Error] InvalidOperationException
[Error] [0] (InvalidOperationException) : Sequence contains more than one matching element
[Error] at Linq.Enumerable.SingleOrDefault[TSource] (Collections.Generic.IEnumerable1[T] source, Func
2[T,TResult] predicate)
at DiscordBotPlugin.PluginMain.UserLeaves (Object sender, ModuleShared.UserEventArgs args)
[Error] --- End Exception Data ---
[Warning] Unsigned plugins are loaded, error report will not be submitted.
[Warning] Last error was raised less than 60 minutes ago, error report will not be submitted.
[15:32:00] [ErrorReporter Info] : ####################################
[15:32:00] [ErrorReporter Info] : # Self Diagnostics #
[15:32:00] [ErrorReporter Info] : ####################################
[15:32:00] [ErrorReporter Info] : AMP Diagnostics could not establish a solution for this exception.
Describe the bug
No bot control in Configuration screen after installing..
To Reproduce
Steps to reproduce the behaviour:
Expected behaviour
Menu entry being there.
Screenshots
none yet
AMP Instance Info (please complete the following information):
Additional context
Did verything on your pahe without any errors.
Hello, I've been using this AMP discord bot for some time now. I just restarted my AMP server and now it seems my Gmod server can't talk to the bot. Really odd since my other game server / bots are working fine.
Here is the error I am seeing in the logs for the instance.
at Discord.ConnectionManager.ConnectAsync (System.Threading.CancellationTokenSource reconnectCancelToken) [0x0035c] in <a6a460b304954995a24ce8c8ef8a5e30>:0
at Discord.ConnectionManager+<>c__DisplayClass29_0.<StartAsync>b__0 () [0x000d0] in <a6a460b304954995a24ce8c8ef8a5e30>:0
[18:56:34] [DiscordBot:reziem Info] : 18:56:34 Gateway Disconnecting
[18:56:34] [DiscordBot:reziem Info] : 18:56:34 Gateway Disconnecting ApiClient
[18:56:34] [DiscordBot:reziem Info] : 18:56:34 Gateway Waiting for heartbeater
[18:56:34] [DiscordBot:reziem Info] : 18:56:34 Gateway Waiting for guild downloader
[18:56:34] [DiscordBot:reziem Info] : 18:56:34 Gateway Clearing large guild queue
[18:56:34] [DiscordBot:reziem Info] : 18:56:34 Gateway Raising virtual GuildUnavailables
[18:56:34] [DiscordBot:reziem Info] : 18:56:34 Gateway Disconnected
[18:56:40] [DiscordBot:reziem Info] : 18:56:40 Gateway Connecting
[18:56:40] [DiscordBot:reziem Info] : 18:56:40 Gateway Connecting ApiClient
[18:56:40] [DiscordBot:reziem Info] : 18:56:40 Gateway System.Net.Http.HttpRequestException: The SSL connection could not be established, see inner exception. ---> System.Security.Authentication.AuthenticationException: Authentication failed, see inner exception. ---> Mono.Btls.MonoBtlsException: Ssl error:1000007d:SSL routines:OPENSSL_internal:CERTIFICATE_VERIFY_FAILED
at /usr/src/mono/external/boringssl/ssl/handshake_client.c:1132
at Mono.Btls.MonoBtlsContext.ProcessHandshake () [0x00048] in <f2109503c3e3478285aacd4ff1d0db97>:0
at Mono.Net.Security.MobileAuthenticatedStream.ProcessHandshake (Mono.Net.Security.AsyncOperationStatus status, System.Boolean renegotiate) [0x000da] in <f2109503c3e3478285aacd4ff1d0db97>:0
at (wrapper remoting-invoke-with-check) Mono.Net.Security.MobileAuthenticatedStream.ProcessHandshake(Mono.Net.Security.AsyncOperationStatus,bool)
at Mono.Net.Security.AsyncHandshakeRequest.Run (Mono.Net.Security.AsyncOperationStatus status) [0x00006] in <f2109503c3e3478285aacd4ff1d0db97>:0
at Mono.Net.Security.AsyncProtocolRequest.ProcessOperation (System.Threading.CancellationToken cancellationToken) [0x000fc] in <f2109503c3e3478285aacd4ff1d0db97>:0
--- End of inner exception stack trace ---
at Mono.Net.Security.MobileAuthenticatedStream.ProcessAuthentication (System.Boolean runSynchronously, Mono.Net.Security.MonoSslAuthenticationOptions options, System.Threading.CancellationToken cancellationToken) [0x00262] in <f2109503c3e3478285aacd4ff1d0db97>:0
at System.Net.Http.ConnectHelper.EstablishSslConnectionAsyncCore (System.IO.Stream stream, System.Net.Security.SslClientAuthenticationOptions sslOptions, System.Threading.CancellationToken cancellationToken) [0x000c3] in <bc658718ea7d4001b08584cf723318ed>:0
--- End of inner exception stack trace ---
at System.Net.Http.ConnectHelper.EstablishSslConnectionAsyncCore (System.IO.Stream stream, System.Net.Security.SslClientAuthenticationOptions sslOptions, System.Threading.CancellationToken cancellationToken) [0x00102] in <bc658718ea7d4001b08584cf723318ed>:0
at System.Net.Http.HttpConnectionPool.CreateConnectionAsync (System.Net.Http.HttpRequestMessage request, System.Threading.CancellationToken cancellationToken) [0x00322] in <bc658718ea7d4001b08584cf723318ed>:0
at System.Net.Http.HttpConnectionPool.WaitForCreatedConnectionAsync (System.Threading.Tasks.ValueTask`1[TResult] creationTask) [0x000a2] in <bc658718ea7d4001b08584cf723318ed>:0
at System.Net.Http.HttpConnectionPool.SendWithRetryAsync (System.Net.Http.HttpRequestMessage request, System.Boolean doRequestAuth, System.Threading.CancellationToken cancellationToken) [0x00089] in <bc658718ea7d4001b08584cf723318ed>:0
at System.Net.Http.RedirectHandler.SendAsync (System.Net.Http.HttpRequestMessage request, System.Threading.CancellationToken cancellationToken) [0x000ba] in <bc658718ea7d4001b08584cf723318ed>:0
at System.Net.Http.DecompressionHandler.SendAsync (System.Net.Http.HttpRequestMessage request, System.Threading.CancellationToken cancellationToken) [0x000ca] in <bc658718ea7d4001b08584cf723318ed>:0
at System.Net.Http.HttpClient.FinishSendAsyncBuffered (System.Threading.Tasks.Task`1[TResult] sendTask, System.Net.Http.HttpRequestMessage request, System.Threading.CancellationTokenSource cts, System.Boolean disposeCts) [0x0017e] in <bc658718ea7d4001b08584cf723318ed>:0
at Discord.Net.Rest.DefaultRestClient.SendInternalAsync (System.Net.Http.HttpRequestMessage request, System.Threading.CancellationToken cancelToken, System.Boolean headerOnly) [0x000bc] in <a6a460b304954995a24ce8c8ef8a5e30>:0
at Discord.Net.Rest.DefaultRestClient.SendAsync (System.String method, System.String endpoint, System.Threading.CancellationToken cancelToken, System.Boolean headerOnly, System.String reason, System.Collections.Generic.IEnumerable`1[T] requestHeaders) [0x00149] in <a6a460b304954995a24ce8c8ef8a5e30>:0
at Discord.Net.Queue.RequestBucket.SendAsync (Discord.Net.Queue.RestRequest request) [0x00254] in <a6a460b304954995a24ce8c8ef8a5e30>:0
at Discord.Net.Queue.RequestQueue.SendAsync (Discord.Net.Queue.RestRequest request) [0x0010e] in <a6a460b304954995a24ce8c8ef8a5e30>:0
at Discord.API.DiscordRestApiClient.SendInternalAsync (System.String method, System.String endpoint, Discord.Net.Queue.RestRequest request) [0x00157] in <a6a460b304954995a24ce8c8ef8a5e30>:0
at Discord.API.DiscordRestApiClient.SendAsync[TResponse] (System.String method, System.String endpoint, Discord.Net.BucketId bucketId, Discord.Net.Queue.ClientBucketType clientBucket, Discord.RequestOptions options) [0x000c9] in <a6a460b304954995a24ce8c8ef8a5e30>:0
at Discord.API.DiscordSocketApiClient.ConnectInternalAsync () [0x00180] in <a6a460b304954995a24ce8c8ef8a5e30>:0
at Discord.API.DiscordSocketApiClient.ConnectInternalAsync () [0x002dd] in <a6a460b304954995a24ce8c8ef8a5e30>:0
at Discord.API.DiscordSocketApiClient.ConnectAsync () [0x000ef] in <a6a460b304954995a24ce8c8ef8a5e30>:0
at Discord.WebSocket.DiscordSocketClient.OnConnectingAsync () [0x001d1] in <a6a460b304954995a24ce8c8ef8a5e30>:0
at Discord.ConnectionManager.ConnectAsync (System.Threading.CancellationTokenSource reconnectCancelToken) [0x0035c] in <a6a460b304954995a24ce8c8ef8a5e30>:0
at Discord.ConnectionManager+<>c__DisplayClass29_0.<StartAsync>b__0 () [0x000d0] in <a6a460b304954995a24ce8c8ef8a5e30>:0
[18:56:40] [DiscordBot:reziem Info] : 18:56:40 Gateway Disconnecting
[18:56:40] [DiscordBot:reziem Info] : 18:56:40 Gateway Disconnecting ApiClient
[18:56:40] [DiscordBot:reziem Info] : 18:56:40 Gateway Waiting for heartbeater
[18:56:40] [DiscordBot:reziem Info] : 18:56:40 Gateway Waiting for guild downloader
[18:56:40] [DiscordBot:reziem Info] : 18:56:40 Gateway Clearing large guild queue
[18:56:40] [DiscordBot:reziem Info] : 18:56:40 Gateway Raising virtual GuildUnavailables
[18:56:40] [DiscordBot:reziem Info] : 18:56:40 Gateway Disconnected
Really odd it all of sudden stopped working. It's almost like I am getting rate limited? I do have a decent amount of discord bots in my server. I also tried kicking it from my discord and re-inviting it - no luck.
Any help will be greatly appreciated. Thank you :)
Describe the solution you'd like
Add the option to send all console output to a specific Discord channel.
Additional context
Should be able to select the channel and toggle on and off.
Describe the bug
removing bot from discord server does not delete commands
To Reproduce
Steps to reproduce the behaviour:
add bot to server
remove bot from server
Expected behaviour
all commands used by bot would be deleted from discord server
is there a set of manual api requests available so i can delete the bots commands or will i have to try and make them myself?
Describe the bug
[21:36:13] [DiscordBot:admin Info] : 22:36:13 Gateway A SlashCommandExecuted handler has thrown an unhandled exception.:
System.NullReferenceException: Object reference not set to an instance of an object.
at DiscordBotPlugin.PluginMain.d__24.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
at DiscordBotPlugin.PluginMain.d__44.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.ConfiguredTaskAwaitable.ConfiguredTaskAwaiter.GetResult()
at Discord.EventExtensions.d__1`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.ConfiguredTaskAwaitable.ConfiguredTaskAwaiter.GetResult()
at Discord.WebSocket.DiscordSocketClient.d__172.MoveNext()
To Reproduce
Steps to reproduce the behaviour:
Expected behaviour
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
AMP Instance Info (please complete the following information):
Additional context
Add any other context about the problem here.
Describe the bug
If the application crashes or a player exit event isn't picked up correctly by AMP then the playtime for that player keeps counting.
To Reproduce
Steps to reproduce the behaviour:
Expected behaviour
If server is stopped or crashed the playtime count should not move
Screenshots
N/A
AMP Instance Info (please complete the following information):
Additional context
N/A
Hi,
i installed the DiscordBot on my AMP Application. I got following Problem while i typing "/atlanticoreenshrouded info" command in Discord channel: "You do not have permission to use this command!".
On my Discord-Server i got full permissions. I didnt found any settings to give my Account the Permission or something else about the AMP Application settings.
Describe the bug
AMP does not start with the bot installed
To Reproduce
Follow https://github.com/winglessraven/AMP-Discord-Bot?tab=readme-ov-file#installing-and-enabling-the-plugin
amp dev.cmd:
ampinstmgr stop ADS01
ampinstmgr reactivate ADS01 <devkey>
taskkill /f /im AMP.exe
ampinstmgr start ADS01
Logs
[22:47:22] [AMPService Info] : Starting AMPService version 2.4.8.0 (Decadeus), built 29/01/2024 18:40
[22:47:22] [AMPService Info] : Stream: Mainline / Release - built by CUBECODERS/buildbot on CCL-DEV
[22:47:22] [GSMyAdmin Info] : Purging old audit logs (this may take a moment)...
[22:47:22] [AMPService Info] : Running in a HyperV environment.
[22:47:23] [GSMyAdmin Warning] : Current time zone is set to W. Europe Standard Time - It is recommended you switch to UTC+0 to avoid time-zone related issues
[22:47:23] [AMPService Info] : OS: Windows / x86_64
[22:47:23] [AMPService Info] : CPU: AMD EPYC Processor (with IBPB) (4C/4T)
[22:47:23] [AMPService Info] : RAM: 8191MB
[22:47:23] [AMPService Info] : AMP Instance ID: xxx
[22:47:23] [GSMyAdmin Warning] : Assembly Newtonsoft.Json was loaded for Core via fallback handler, check plugin dependencies.
[22:47:23] [GSMyAdmin Info] : Loaded ADSModule version 1.0.0.0 by CubeCoders Limited
[22:47:23] [GSMyAdmin Info] : Loaded FileManagerPlugin by CubeCoders Limited
[22:47:23] [GSMyAdmin Info] : Loaded EmailSenderPlugin by CubeCoders Limited
[22:47:23] [GSMyAdmin Info] : Loaded WebRequestPlugin by CubeCoders Limited
[22:47:23] [GSMyAdmin Info] : Loaded LocalFileBackupPlugin by CubeCoders Limited
[22:47:23] [GSMyAdmin Info] : Loaded CommonCorePlugin by CubeCoders Limited
[22:47:23] [Core Error] : CryptographicException
[22:47:23] [Core Error] : [0] (CryptographicException) : Cannot find the requested object.
[22:47:23] [Core Error] : at Security.Cryptography.CryptographicException.ThrowCryptographicException(Int32 hr)
at Security.Cryptography.X509Certificates.X509Utils._QueryCertFileType(String fileName)
at Security.Cryptography.X509Certificates.X509Certificate.LoadCertificateFromFile(String fileName, Object password, X509KeyStorageFlags keyStorageFlags)
at GSMyAdmin.SignatureVerification.Verify_Windows(String Filename)
[22:47:23] [GSMyAdmin Error] : Unable to load plugin DiscordBotPlugin: Could not load file or assembly 'DiscordBotPlugin' or one of its dependencies. Failure during Cryptographic operation. (Exception from HRESULT: 0x80131430)
[22:47:23] [GSMyAdmin Error] : Could not load plugin DiscordBotPlugin
[22:47:23] [GSMyAdmin Info] : ADSModule requests dependency InstanceManagerPlugin...
Heyo, I was thinking how difficult would it be to implement a notifier when server is down? So for example is your bot discovers change of state from "Ready" to something else it would send you a tagged discord message?
As per the title, the plugin is installed and appears in AMP, but it is not online on Discord. There are no errors. Version 2.4.6 - 20230802.1.
Can you add a ping message function that sends a message in discord if a user joins the game server ?
Can i use this plugin with multiple server instances? It doesnt seem to work. I think i reactivated the ADS instance with the dev key, but cant get the plugin work with a second game Server.
Describe the bug
I followed every step in the setup process, skipping the install script, and I was able to set all the bot configurations. But when I restart the instance, nothing happens. The bot does not turn on and come online in my Discord server. I currently developed Discord bots, so I know I set everything up correctly. I'm just not entirely sure why the bot would not be starting with the instance, or if i missed something. Any help on this issue would be appreciated.
To Reproduce
Steps to reproduce the behaviour:
Follow every step of the setup process, not using install script.
Expected behaviour
The bot to run.
AMP Instance Info (please complete the following information):
Describe the solution you'd like
A clear and concise description of what you want to happen.
If you do /serverinfo in an announcement channel it keeps updating. i really want to tell you more
Additional context
Add any other context or screenshots about the feature request here.
I know discord has some extra screens before it publishes a message.
and when you want to edit the message
I don't know if that is possible... but it would be highly appreciated!
Describe the solution you'd like
Change the '/[BOT NAME] command' to just '/command' so that the commands can be restricted per Discord role.
Additional context
This change would allow specified users to run certain commands and restrict others from being capable. For example an 'Admin' group would be able to run '/restart-server' but group 'everyone' would not be able to.
Describe the solution you'd like
Instead of putting in channel names, would it not be easier to use the channel ID?
Additional context
using channel names can be difficult as some guilds have channels with the same name nested under different categories,
so using names will only point to the first one it found, and not always the one you want
Describe the bug
CryptographicException
[0] (CryptographicException) : Cannot find the requested object.
at Security.Cryptography.CryptographicException.ThrowCryptographicException(Int32 hr) at Security.Cryptography.X509Certificates.X509Utils._QueryCertFileType(String fileName) at Security.Cryptography.X509Certificates.X509Certificate.LoadCertificateFromFile(String fileName, Object password, X509KeyStorageFlags keyStorageFlags) at GSMyAdmin.SignatureVerification.Verify_Windows(String Filename)
Unable to load plugin DiscordBotPlugin: Could not load file or assembly 'DiscordBotPlugin' or one of its dependencies. Failure during Cryptographic operation. (Exception from HRESULT: 0x80131430)
To Reproduce
Stopping and restarting doesnt help
AMP Instance Info (please complete the following information):
The console syntax used to capture and send messages in the game chat is incorrect on Minecraft Pocket Edition.
For example ''/say'' in Minecraft Java becomes ''say'' in Minecraft Pocket Edition.
I don't know if this observation is useful.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.