From b64edd95e0729adbe66fce47bc2c96c23ebf41fc Mon Sep 17 00:00:00 2001 From: SeanOMik Date: Mon, 22 Jun 2020 15:57:42 -0500 Subject: [PATCH] Fix documentation generating scripts. --- generate_docs.bat | 32 +++++++++++++++++++------------- generate_docs.sh | 32 +++++++++++++++++++------------- src/nimcord.nim | 20 ++++++++++++++++---- src/nimcord/client.nim | 2 +- 4 files changed, 55 insertions(+), 31 deletions(-) diff --git a/generate_docs.bat b/generate_docs.bat index 36a5318..29a905e 100644 --- a/generate_docs.bat +++ b/generate_docs.bat @@ -1,13 +1,19 @@ -nim doc -o:docs/Cache.html src/cache.nim -nim doc -o:docs/Channel.html src/channel.nim -nim doc -o:docs/Client.html src/client.nim -nim doc -o:docs/ClientObjects.html src/clientobjects.nim -nim doc -o:docs/DiscordObject.html src/discordobject.nim -nim doc -o:docs/Emoji.html src/emoji.nim -nim doc -o:docs/EventDispatcher.html src/eventdispatcher.nim -nim doc -o:docs/EventHandler.html src/eventhandler.nim -nim doc -o:docs/Guild.html src/guild.nim -nim doc -o:docs/Member.html src/member.nim -nim doc -o:docs/Message.html src/message.nim -nim doc -o:docs/Nimcordutils.html src/nimcordutils.nim -nim doc -o:docs/User.html src/user.nim \ No newline at end of file +nim doc -o:docs/NimCord.html src/nimcord.nim +nim doc -o:docs/Cache.html src/nimcord/cache.nim +nim doc -o:docs/Channel.html src/nimcord/channel.nim +nim doc -o:docs/Client.html src/nimcord/client.nim +nim doc -o:docs/ClientObjects.html src/nimcord/clientobjects.nim +nim doc -o:docs/DiscordObject.html src/nimcord/discordobject.nim +nim doc -o:docs/Embed.html src/nimcord/embed.nim +nim doc -o:docs/Emoji.html src/nimcord/emoji.nim +nim doc -o:docs/EventDispatcher.html src/nimcord/eventdispatcher.nim +nim doc -o:docs/EventHandler.html src/nimcord/eventhandler.nim +nim doc -o:docs/Guild.html src/nimcord/guild.nim +nim doc -o:docs/Image.html src/nimcord/image.nim +nim doc -o:docs/Member.html src/nimcord/member.nim +nim doc -o:docs/Message.html src/nimcord/message.nim +nim doc -o:docs/Nimcordutils.html src/nimcord/nimcordutils.nim +nim doc -o:docs/Permission.html src/nimcord/permission.nim +nim doc -o:docs/Presence.html src/nimcord/presence.nim +nim doc -o:docs/Role.html src/nimcord/role.nim +nim doc -o:docs/User.html src/nimcord/user.nim \ No newline at end of file diff --git a/generate_docs.sh b/generate_docs.sh index a27e30c..743718d 100644 --- a/generate_docs.sh +++ b/generate_docs.sh @@ -1,13 +1,19 @@ -nim doc -o:docs/Cache.html src/cache.nim -nim doc -o:docs/Channel.html src/channel.nim -nim doc -o:docs/Client.html src/client.nim -nim doc -o:docs/ClientObjects.html src/clientobjects.nim -nim doc -o:docs/DiscordObject.html src/discordobject.nim -nim doc -o:docs/Emoji.html src/emoji.nim -nim doc -o:docs/EventDispatcher.html src/eventdispatcher.nim -nim doc -o:docs/EventHandler.html src/eventhandler.nim -nim doc -o:docs/Guild.html src/guild.nim -nim doc -o:docs/Member.html src/member.nim -nim doc -o:docs/Message.html src/message.nim -nim doc -o:docs/Nimcordutils.html src/nimcordutils.nim -nim doc -o:docs/User.html src/user.nim \ No newline at end of file +nim doc -o:docs/NimCord.html src/nimcord.nim +nim doc -o:docs/Cache.html src/nimcord/cache.nim +nim doc -o:docs/Channel.html src/nimcord/channel.nim +nim doc -o:docs/Client.html src/nimcord/client.nim +nim doc -o:docs/ClientObjects.html src/nimcord/clientobjects.nim +nim doc -o:docs/DiscordObject.html src/nimcord/discordobject.nim +nim doc -o:docs/Embed.html src/nimcord/embed.nim +nim doc -o:docs/Emoji.html src/nimcord/emoji.nim +nim doc -o:docs/EventDispatcher.html src/nimcord/eventdispatcher.nim +nim doc -o:docs/EventHandler.html src/nimcord/eventhandler.nim +nim doc -o:docs/Guild.html src/nimcord/guild.nim +nim doc -o:docs/Image.html src/nimcord/image.nim +nim doc -o:docs/Member.html src/nimcord/member.nim +nim doc -o:docs/Message.html src/nimcord/message.nim +nim doc -o:docs/Nimcordutils.html src/nimcord/nimcordutils.nim +nim doc -o:docs/Permission.html src/nimcord/permission.nim +nim doc -o:docs/Presence.html src/nimcord/presence.nim +nim doc -o:docs/Role.html src/nimcord/role.nim +nim doc -o:docs/User.html src/nimcord/user.nim \ No newline at end of file diff --git a/src/nimcord.nim b/src/nimcord.nim index 5f7d517..6ac72c5 100644 --- a/src/nimcord.nim +++ b/src/nimcord.nim @@ -1,3 +1,18 @@ +## Welcome to NimCord Documentation! +## +## NimCord is a Discord API wrapper written in Nim. +## Its created by SeanOMik, who also created [DisC++](https://github.com/DisCPP/DisCPP), +## a Discord API wrapper written in C++. +## +## Because of my (SeanOMik) work with C++, I made sure to make NimCord +## member optimized but keep it simple to use and feature rich. +## +## Each modules are split in an object fashion. So `client` handles all gateway stuff, +## `member` defines the GuildMember type and some procs to modify it. +## +## The module `nimcordutils` defined some helper procs. Currently (as of 0.0.1) these +## procs are only used by Nimcord and likely wont be useful to the user. + import nimcord/[cache, channel, client, clientobjects, discordobject] import nimcord/[embed, eventdispatcher, guild, image, member, message] import nimcord/[nimcordutils, permission, presence, role, user] @@ -6,7 +21,4 @@ export cache, channel, client, clientobjects, discordobject export embed, eventdispatcher, guild, image, member, message export nimcordutils, permission, presence, role, user -const - nimcordMajor = 0 - nimcordMinor = 0 - nimcordMicro = 1 \ No newline at end of file +const NimCordVersion = "v0.0.1" \ No newline at end of file diff --git a/src/nimcord/client.nim b/src/nimcord/client.nim index c0737e7..beffc9e 100644 --- a/src/nimcord/client.nim +++ b/src/nimcord/client.nim @@ -213,7 +213,7 @@ var bot = newDiscordClient(tkn) registerEventListener(EventType.evtReady, proc(bEvt: BaseEvent) = let event = ReadyEvent(bEvt) - echo "Ready! (v", nimcordMajor, ".", nimcordMinor, ".", nimcordMicro, ")" + echo "Ready! (v", 0, ".", 0, ".", 1, ")" echo "Logged in as: ", bot.clientUser.username, "#", bot.clientUser.discriminator echo "ID: ", bot.clientUser.id echo "--------------------"