Skip to content
Simon Hjorthøj edited this page Dec 19, 2021 · 13 revisions

Discord.KillersLibrary

NuGet Discord

This is an addon for the Discord API Wrapper Discord.Net.

Installation

Make sure to use the preview version of this package if you are planning to use the preview of Discord.Net.

Features

Usage

To properly use the features this addon provides you need to add the EmbedPagesService or MultiButtonsService to your service provider depending on which part you want.

var provider = new ServiceCollection()
    .AddSingleton<EmbedPagesService>() // For embedding pages.
    .AddSingleton<MultiButtonsService>(); // For multi buttons.
    ....

Dependency Injection in commands.

public EmbedPagesService EmbedPagesService { get; set; }
public MultiButtonsService MultiButtonsService { get; set; }

Dependency Injection using ctor.

private readonly EmbedPagesService _embedPagesService;
private readonly MultiButtonsService _multiButtonsService;

public CTOR(EmbedPagesService embedPagesService, MultiButtonsService multiButtonsService) {
    _embedPagesService = embedPagesService;
    _multiButtonsService = multiButtonsService;
}