Skip to content

Commit

Permalink
Ready for publish
Browse files Browse the repository at this point in the history
  • Loading branch information
CPULL committed Feb 24, 2022
1 parent 7f62da5 commit 9d633e2
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 20 deletions.
Binary file added Images/Example TrackingChannel Setup Command.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion UPBot Code/Commands/Game.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ public async Task RPSCommand(CommandContext ctx) {
int val = random.Next(0, 3);

while (ir != null) {
ir.Handled = true;
await ctx.Channel.DeleteMessageAsync(msg);
if (ir.Id == "idrock") {
if(val == 0) {
Expand Down
16 changes: 3 additions & 13 deletions UPBot Code/Commands/Version.cs
Original file line number Diff line number Diff line change
@@ -1,27 +1,17 @@
using DSharpPlus.CommandsNext;
using DSharpPlus.CommandsNext.Attributes;
using DSharpPlus.Entities;
using System;
using System.Threading.Tasks;
/// <summary>
/// This command implements a WhoIs command.
/// It gives info about a Discord User or yourself
/// This command implements a Version command.
/// Just to check the version of the bot
/// author: CPU
/// </summary>
public class Version : BaseCommandModule {

[Command("Version")]
[Description("Get version information about the bot.")]
public async Task VersionCommand(CommandContext ctx) {
string authors = "<@!231753250687287296>, <@!411526180873961494>, <@!340661564556312591>, <@!486133356858310656>, <@!608994148313333763>";
if (ctx.Guild != null && ctx.Guild.Id == 830900174553481236ul) {
DiscordMember cpu = ctx.Guild.GetMemberAsync(231753250687287296ul).Result;
DiscordMember duck = ctx.Guild.GetMemberAsync(411526180873961494ul).Result;
DiscordMember eremiell = ctx.Guild.GetMemberAsync(340661564556312591ul).Result;
DiscordMember slice = ctx.Guild.GetMemberAsync(486133356858310656ul).Result;
DiscordMember jonathan = ctx.Guild.GetMemberAsync(608994148313333763ul).Result;
authors = cpu.Mention + ", " + duck.Mention + ", " + eremiell.Mention + ", " + slice.Mention + ", " + jonathan.Mention;
}
string authors = "**CPU**, **Duck**, **Eremiell**, **SlicEnDicE**, **J0nathan**";

await ctx.Message.RespondAsync(Utils.BuildEmbed("United Programming Bot",
"**Version**: " + Utils.GetVersion() + "\n\nContributors: " +
Expand Down
4 changes: 2 additions & 2 deletions UPBot Code/Commands/WhoIs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ private Task GenerateWhoIs(CommandContext ctx, DiscordMember m) {
if (m.Permissions.HasFlag(DSharpPlus.Permissions.Speak)) perms += ", Speak";
if (m.Permissions.HasFlag(DSharpPlus.Permissions.ManageRoles)) perms += ", Manage Roles";
if (m.Permissions.HasFlag(DSharpPlus.Permissions.ManageEmojis)) perms += ", Manage Emojis";
if (m.Permissions.HasFlag(DSharpPlus.Permissions.UseSlashCommands)) perms += ", Use Bot";
if (m.Permissions.HasFlag(DSharpPlus.Permissions.UsePublicThreads)) perms += ", Use Threads";
if (m.Permissions.HasFlag(DSharpPlus.Permissions.UseApplicationCommands)) perms += ", Use Bot";
if (m.Permissions.HasFlag(DSharpPlus.Permissions.CreatePublicThreads)) perms += ", Use Threads";
if (perms.Length > 0) embed.AddField("Permissions", perms[2..], false);

return ctx.RespondAsync(embed.Build());
Expand Down
1 change: 1 addition & 0 deletions UPBot Code/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

namespace UPBot {
class Program {

static void Main(string[] args) {
if (args.Length >= 3) Utils.LogsFolder = args[2];
Utils.Log("Log Started. Woho.", null);
Expand Down
2 changes: 1 addition & 1 deletion UPBot Code/Utils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public static class Utils
readonly private static Dictionary<string, StreamWriter> logs = new Dictionary<string, StreamWriter>();

public static string GetVersion() {
return vmajor + "." + vminor + "." + vbuild + " - 2022/02/14";
return vmajor + "." + vminor + "." + vbuild + " - 2022/02/24";
}

public static DiscordClient GetClient() {
Expand Down
6 changes: 3 additions & 3 deletions UPBot.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="DSharpPlus" Version="4.1.0" />
<PackageReference Include="DSharpPlus.CommandsNext" Version="4.1.0" />
<PackageReference Include="DSharpPlus.Interactivity" Version="4.1.0" />
<PackageReference Include="DSharpPlus" Version="4.2.0-nightly-01072" />
<PackageReference Include="DSharpPlus.CommandsNext" Version="4.2.0-nightly-01072" />
<PackageReference Include="DSharpPlus.Interactivity" Version="4.2.0-nightly-01072" />
<PackageReference Include="SQLite" Version="3.13.0" />
<PackageReference Include="System.Data.SQLite" Version="1.0.114.4" />
<PackageReference Include="System.Drawing.Common" Version="6.0.0" />
Expand Down

0 comments on commit 9d633e2

Please sign in to comment.