GunzCord is a Discord Bot for GunZ Servers. It provides commands that retrieve information from your GunZ server
Please nothe that the !server and !online commands are only available for Microsoft SQL Server Databases and not for SQLite3 Databases.
GunzCord also includes Clan War notifications, a message will be sent to a specific channel every time Clan War match ends. This feature is only available for Microsoft SQL Server Databases
First, you will need to create a Discord Application and then create a Bot inside that application.
You will need to retrieve a Bot Token from the application.
For instructions on how to create the application and bot, check this article from the Discord.Net documentation: https://discord.foxbot.me/stable/guides/getting_started/first-bot.html
Configure the Connection String to match with your Database's Name, User and Password.
It's recommended to set the db_owner
role to your SQL user unless you know exactly which permission to grant
If you are using a SQLite3 Database:
DatabaseType
setting to SQLITE
EnableClanWarNotifications
setting to false
Configure the Token
setting with the Bot token you generated when the Discord app was created.
If you are not using the Clan War notifications, set EnableClanWarNotifications
to false
to prevent configuration errors
Otherwise, if you want to use the Clan War notifications, you must set the ServerId
and NotificationsChannelId
with your Discord Server Id and the Channel Id where you want the notifications to be sent. You will also have to do the Enable Service Broker step in the setup.
Check Discord documentation on how to get the server and channel ids here: https://support.discordapp.com/hc/en-us/articles/206346498-Where-can-I-find-my-User-Server-Message-ID-
Configure EmblemBaseUrl
with the URL prefix for your clan emblems, it's the same you set up at system.xml in your Gunz client.
Currently localizations for English and Spanish are provided with the application.
To specify the localization, modify the locale
property to en-US
for English and to es
for Spanish.
If you want to add another localization, create a Strings.{locale}.resx with your localization and submit a pull request.
There are other settings at appsettings.json you can play with.
Excecute the install.sql script provided with GunzCord to install all the required stored procedures in your Gunz Database
If you want to use Clan War notifications, you must enable the Service Broker for them to work. To enable the Service Broker execute the following SQL statement in your Gunz Database:
ALTER DATABASE GunzDB SET ENABLE_BROKER WITH ROLLBACK IMMEDIATE
Once all the setup steps have been made, you may run GunzCord.exe to start running the bot.
Check the console or log files for any errors you may encounter.
This software is licensed under the GNU General Public License v3.0