Jump to content

Discord warn invalid

Work in Progress 2.0.2

TaoXi_Honey
TaoXi_Honey

Posted

I used the latest Discord DLL , Using/warn in the game or warm in the console is valid, but it is invalid in Discord without any errors.

 

When I use the warm command in the game and then use the warm list on Discord, an error will appear:

Quote

An Error has Occurred:
Please check console/log channel for the specific details of the error.

 

TaoXi_Honey

Posted

After using the/learn command in the game, although it can be executed successfully, when I use the/learn list command in Discord again, Discord bot will prompt me:

Quote

An Error has Occurred:  Please check console/log channel for the specific details of the error.

Simultaneously, there is a Server Console Error:

Quote

System.FormatException: Input string was not in a correct format.
  at System.Number.ThrowOverflowOrFormatException (System.Boolean overflow, System.String overflowResourceKey) [0x0001a] in <8ce0bd04a7a04b4b9395538239d3fdd8>:0
  at System.Number.ParseUInt64 (System.ReadOnlySpan`1[T] value, System.Globalization.NumberStyles styles, System.Globalization.NumberFormatInfo info) [0x00019] in <8ce0bd04a7a04b4b9395538239d3fdd8>:0
  at System.UInt64.Parse (System.String s, System.IFormatProvider provider) [0x00017] in <8ce0bd04a7a04b4b9395538239d3fdd8>:0
  at System.Convert.ToUInt64 (System.String value) [0x0000c] in <8ce0bd04a7a04b4b9395538239d3fdd8>:0
  at Oxide.Plugins.AdminTools.IsDiscordID (System.String stringID) [0x00000] in <3735c00853ee4fac93b215de063da57b>:0
  at Oxide.Plugins.AdminTools+WarnData.DiscordToString () [0x00000] in <3735c00853ee4fac93b215de063da57b>:0
  at Oxide.Plugins.AdminTools.WarningList (Oxide.Core.Libraries.Covalence.IPlayer targetPlayer, Oxide.Ext.Discord.Entities.DiscordInteraction interaction, Oxide.Ext.Discord.Entities.InteractionDataArgs parsed) [0x000c9] in <3735c00853ee4fac93b215de063da57b>:0

 

ViolationHandler.exe

Posted (edited)

Please make sure you have the right version of DiscordExtension, it looks like you're using some sort of test version based on the first console snippit:

"[DiscordExtension] [Warning]: Using Discord Test Version: 3.0.0.RC.1"

 

This is the latest on GitHub, or from uMod.

 

My guess is this is the cause for the other issues in the other ticket as well. if you change versions to latest and are still having issues, please let me know.

Edited by ViolationHandler.exe
TaoXi_Honey

Posted

is my issus, warn player and warn add command....I didn't understand the meaning of these two orders at first.

 

I have many servers. If you want to ban players, you have to ban each server once. Can this plugin support global ban?

ViolationHandler.exe

Posted

Ah okay, no worries. Currently the functionality of a global ban doesn't exist in the plugin, but sounds like it'd be useful.

 

I can attempt to add a `global` setting to the ban command through discord to allow for you to ban players from all servers as opposed to just the one. If that doesn't work, my other thought would be swapping to the server "all" or "*" with /server (server name here), however, personally I think this would be annoying and inconvenient for the users. I also think they could accidentally leave themselves on all mode and cause some issues.

 

Command Explanations in case you still wanted some clarifications:

warn player will give the player a warning with a UI that pops up on their screen with the reason from the player who warned them.

warn add will add a warning to the players list of warning without directly notifying the warned player (no UI pops up for them).

Note: UI may be different based on your config settings, could be a toast.

TaoXi_Honey

Posted

Regarding global ban, MySQL can be used, or ready-made plugins can be used directly https://umod.org/plugins/enhanced-ban-system However, this plugin does not support Discord operations and can only send ban messages to Discord. Currently, I have disabled the ban function of AdminTools and used the run 'command' function to ban players through Discord. However, the enhanced ban system does not have shortcut buttons, unban, or Editban in Discord. I strongly recommend that you use the enhanced ban system plugin as a dependency

TaoXi_Honey

Posted (edited)

2 minutes ago, TaoXi_Honey said:

d' 功能通过 Discord 封禁玩家。但是,增

enhanced ban system ' s discord webhook , it is too simple

 

image.png

Edited by TaoXi_Honey
ViolationHandler.exe

Posted

13 hours ago, TaoXi_Honey said:

Regarding global ban, MySQL can be used, or ready-made plugins can be used directly https://umod.org/plugins/enhanced-ban-system However, this plugin does not support Discord operations and can only send ban messages to Discord. Currently, I have disabled the ban function of AdminTools and used the run 'command' function to ban players through Discord. However, the enhanced ban system does not have shortcut buttons, unban, or Editban in Discord. I strongly recommend that you use the enhanced ban system plugin as a dependency

The only way I'd be adding multi-server ban support would be via the built-in functionality of the plugin. I also 100% do not plan on utilizing the enhanced ban system as a dependency of the plugin. I'd rather not have to require a separate plugin just so users can ban a player across multiple servers, in my opinion that's poor design. I will say, however, that the SQL functionality would be nice to have in my own plugin, but I don't know nearly enough about SQL to even attempt such a goal/project, nor would it really be necessary if I use the functionality I've already built into the plugin

 

The functionality of banning players across multiple servers itself is a good feature that I'd like to add to this plugin (without requiring a separate plugin to function). The "downside" is you'd need this plugin in all servers utilizing the ban, but I'm pretty sure the same would be true for the Enhanced Ban System plugin.

 

Also is there a reason you use the run command as opposed to just using the ban command? They do exactly the same thing, they're running the same logic internally, I'd think it'd be easier using the auto complete command tbh, but if you find it easier to use the run command, that's okay as well.

TaoXi_Honey

Posted (edited)

19 hours ago, ViolationHandler.exe said:

The only way I'd be adding multi-server ban support would be via the built-in functionality of the plugin. I also 100% do not plan on utilizing the enhanced ban system as a dependency of the plugin. I'd rather not have to require a separate plugin just so users can ban a player across multiple servers, in my opinion that's poor design. I will say, however, that the SQL functionality would be nice to have in my own plugin, but I don't know nearly enough about SQL to even attempt such a goal/project, nor would it really be necessary if I use the functionality I've already built into the plugin
我添加多服务器禁令支持的唯一方法是通过插件的内置功能。我也 100% 不打算使用增强的禁令系统作为插件的依赖项。我宁愿不必要求单独的插件,这样用户就可以在多个服务器上禁止一个玩家,在我看来,这是糟糕的设计。但是,我要说的是,在我自己的插件中拥有 SQL 功能会很好,但我对 SQL 的了解还不够多,甚至无法尝试这样的目标/项目,如果我使用我已经内置到插件中的功能,也真的没有必要

 

The functionality of banning players across multiple servers itself is a good feature that I'd like to add to this plugin (without requiring a separate plugin to function). The "downside" is you'd need this plugin in all servers utilizing the ban, but I'm pretty sure the same would be true for the Enhanced Ban System plugin.
在多个服务器上禁止玩家的功能本身就是一个很好的功能,我想添加到这个插件中(不需要单独的插件来运行)。“缺点”是您在所有使用禁令的服务器中都需要此插件,但我很确定增强型禁令系统插件也是如此。

 

Also is there a reason you use the run command as opposed to just using the ban command? They do exactly the same thing, they're running the same logic internally, I'd think it'd be easier using the auto complete command tbh, but if you find it easier to use the run command, that's okay as well.
另外,您使用 run 命令而不是仅使用 ban 命令是否有原因?他们做同样的事情,他们在内部运行相同的逻辑,我认为使用 auto complete 命令 tbh 会更容易,但如果你发现使用 run 命令更容易,那也没关系。

Even if you don't use mysql, I just want to know if you have any plans to add gobal function. When will the new version be updated?

Edited by TaoXi_Honey
ViolationHandler.exe

Posted

On 6/11/2025 at 6:28 AM, TaoXi_Honey said:

Even if you don't use mysql, I just want to know if you have any plans to add gobal function. When will the new version be updated?

Yes, I do plan on adding global bans assuming the ways I have planned work as I expect. I don't have an exact date for when the version will be updated unfortunately as I don't like giving exact dates usually either.

TaoXi_Honey

Posted

Another problem is that in the multi-server mode, the message sent by the plug-in to seems to be unable to distinguish which server it comes from, such as the player reporting. In addition, there are still some buttons in the form I provided after entering /id that can't be translated. Because I am Chinese, I translated all the language files of this plug-in.

Screenshot_2025-06-13-01-51-23-427_com.discord.jpg

ViolationHandler.exe

Posted

5 minutes ago, TaoXi_Honey said:

Another problem is that in the multi-server mode, the message sent by the plug-in to seems to be unable to distinguish which server it comes from, such as the player reporting. In addition, there are still some buttons in the form I provided after entering /id that can't be translated. Because I am Chinese, I translated all the language files of this plug-in.

 

Ah, thank you for pointing that out, I can add the server name in the bottom as a footer for the message possibly, if not there I'll find a spot that works and looks good.

 

When you say it can't be translated do you mean you don't know what it should be translated to, or it doesn't update when you change it?

ViolationHandler.exe

Posted (edited)

Also, your formatting for the bot seems to not be working, but I'm not sure why that'd be the case, specifically the "#" ones. I doubt it'd be Chinese character related either, heres what it looks like on my end:

image.png.63a9c0a5f40e3f15c3d906f226fa64ac.png

 

It seems to occur for your /id command and the message right after too.

Edited by ViolationHandler.exe
TaoXi_Honey

Posted

I couldn't find the templates for the Un Watchlist, Mute, Ban, and Unban buttons, so I couldn't translate them. As for the format, I used AI to translate it, which may make mistakes, but its workload is too heavy and I have to rely on AI

ViolationHandler.exe

Posted

11 hours ago, TaoXi_Honey said:

I couldn't find the templates for the Un Watchlist, Mute, Ban, and Unban buttons, so I couldn't translate them. As for the format, I used AI to translate it, which may make mistakes, but its workload is too heavy and I have to rely on AI

ahhhhhhhh okay, I was trying to understand why I did it the way I did originally. The reasoning behind it is because when you ban someone it changes from "ban" to "unban" so it cannot be a static hard-coded value within the files. I'm not positive the easiest way for you to change that either since I don't think you'd be able to change it without affecting visuals a bit unless you changed each one that couldn't be changed to BOTH options of the command, but personally I think that'd be worse, but then at least it'd be in your language. For clarification/example, "ban" would turn into "ban/unban" and "watchlist" would be "watchlist/un-watchlist".

Also, I'll try and see if I can find a way for those buttons to be more editable in the future so that people can modify them better.
 

No worries for the AI translation, I wouldn't be able to tell if there was an error anyways haha

1.8m

Downloads

Total number of downloads.

8.3k

Customers

Total customers served.

126k

Files Sold

Total number of files sold.

2.6m

Payments Processed

Total payments processed.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.