- Updated to Discord.Net dev-04bf733
- Supports User Accounts
- Authenticate User Accounts without a Token
- Message Timestamps
- Edited Messages will be suffixed with
(EDITED)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
StringBuilder builder = new StringBuilder(); | |
var searchResult = _commands.Search(msg, argPos); | |
if (searchResult.IsSuccess) | |
{ | |
foreach (var cmd in searchResult.Commands) | |
{ | |
builder.Append($"**{cmd.Text}({string.Join(",", cmd.Parameters.Select(x => GetParamName(x)))})** "); | |
var preconditionResult = await cmd.CheckPreconditions(msg); | |
var parseResult = await cmd.Parse(msg, searchResult, preconditionResult); | |
if (parseResult.IsSuccess) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class UtilityModule : ModuleBase | |
{ | |
[Command("purge")] | |
[Alias("clean", "cleanup", "prune")] | |
[Summary("Cleans the bot's messages")] | |
[RequirePermission(ChannelPermission.ManageMessages)] | |
public async Task Clean( | |
[Summary("The optional number of messages to delete; defaults to 10")] int count = 10, | |
[Summary("The type of messages to delete - Self, Bot, or All")] DeleteType deleteType = DeleteType.Self, | |
[Summary("The strategy to delete messages - BulkDelete or Manual")] DeleteStrategy deleteStrategy = DeleteStrategy.BulkDelete) |
I hereby claim:
- I am foxbot on github.
- I am foxbot (https://keybase.io/foxbot) on keybase.
- I have a public key whose fingerprint is 0740 1620 1C1B 5515 ED17 E35B D7BC C95E BD22 D089
To claim this, I am signing this object:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Reflection; | |
using Discord; | |
namespace DiscordBot | |
{ | |
public class LogMutator | |
{ | |
private readonly FieldInfo _sevField; | |
public LogMutator() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class HelpModule : ModuleBase | |
{ | |
private readonly CommandService _commands; | |
private readonly IServiceProvider _map; | |
public HelpModule(IServiceProvider map, CommandService commands) | |
{ | |
_commands = commands; | |
_map = map; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Threading; | |
using System.Threading.Tasks; | |
using Discord; | |
using Discord.WebSocket; | |
// Change this namespace if desired | |
namespace foxboat.Services | |
{ | |
// This service requires that your bot is being run by a daemon that handles |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import aiohttp | |
import asyncio | |
import discord | |
import os | |
CHANNEL_ID = 381870553235193857 | |
class State: | |
def __init__(self, token): | |
self.discord = discord.http.HTTPClient() |