ctw.BotShared 1.0.8.3

There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package ctw.BotShared --version 1.0.8.3                
NuGet\Install-Package ctw.BotShared -Version 1.0.8.3                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ctw.BotShared" Version="1.0.8.3" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ctw.BotShared --version 1.0.8.3                
#r "nuget: ctw.BotShared, 1.0.8.3"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install ctw.BotShared as a Cake Addin
#addin nuget:?package=ctw.BotShared&version=1.0.8.3

// Install ctw.BotShared as a Cake Tool
#tool nuget:?package=ctw.BotShared&version=1.0.8.3                

BotBase

CodeNotary CodeQL

Bot Base is a basic wrapper / framework for DSharp+ https://github.com/DSharpPlus/DSharpPlus

This project was created as a base for getting started, and has no affiliation with DShap+.

Configuration

Rename config.json.example to config.json, set token to your bot token and prefix as the required bot prefix.

You can now also toggle settings related to disabling Default Help and enable/disable DMs

{
  "token": "{{DISCORD_TOKEN}}",
  "prefix": "!",
  "enableDms": true,
  "enableMentionPrefix": false,
  "dmHelp": false,
  "enableDefaultHelp": false
}

SQL Support

Add the following to enable MySql Support

	"sql": 
		{
			"host": "127.0.0.1",
			"user": "bots_user",
			"pass": "bots_password",
			"name": "bots_database"
		}

Creating your own modules

Copy and rename the Examle.Module project in ./Example

Rename the project to be YOURMODLE.Module and apply the change to the Namespace

Rename Example.cs to your required class name.

Update Name, Description and Version as requiruired

In ./Commands create a new class (Eg FunCommands.CS)

Import the following

using System.Threading.Tasks;
using DSharpPlus;
using DSharpPlus.CommandsNext;
using DSharpPlus.CommandsNext.Attributes;
using Microsoft.Extensions.Logging;

Your new class needs to extend BaseCommandModule.

You can now create your own commands in this class!

To learn how to make commands and use DShap+ please check out their repo for the latest

How to debug your modules

To Debug you need to add the following to your CSProj file (Replace {{PATH_TO_REPO}} with your actual path (Eg C:\Repo\BotBase)


  <PropertyGroup>
    <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
    <AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
	<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
  </PropertyGroup>

  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
    <OutputPath>{{PATH_TO_REPO}}\BotBase\bin\Debug\netcoreapp3.1\win10-x64\Plugins\</OutputPath>
    <Optimize>false</Optimize>
  </PropertyGroup>

  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
    <OutputPath>{{PATH_TO_REPO}}\BotBase\bin\Release\netcoreapp3.1\win10-x64\Plugins\</OutputPath>
  </PropertyGroup>


Then in the Debug Settings you will need to set it to Launch an executable

{{PATH_TO_REPO}}\BotBase\bin\Debug\netcoreapp3.1\win10-x64\BotBase.exe

And set the Working Directory to be the location of the exe (eg)

{{PATH_TO_REPO}}\BotBase\bin\Debug\netcoreapp3.1\win10-x64\
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp3.1 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on ctw.BotShared:

Package Downloads
ctw.BotCore

Core Bot Classes for creating a bot using DSharpPlus

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.8.7-beta 767 6/12/2021
1.0.8.6-beta 752 6/5/2021
1.0.8.5-beta 1,027 6/4/2021
1.0.8.4-beta 716 6/3/2021
1.0.8.3 897 6/2/2021
1.0.8.2 873 6/1/2021
1.0.8.1 881 6/1/2021
1.0.8 907 5/31/2021
1.0.7 388 5/31/2021
1.0.6 1,373 12/30/2020
1.0.5 1,015 8/26/2020
1.0.4 1,410 8/25/2020
1.0.3 2,266 6/29/2020
1.0.2 1,064 6/21/2020

Updated NuGet Nuget Dependencies.