A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://nim-lang.org/blog/2021/01/26/this-month-with-nim.html below:

This Month with Nim - Nim Blog

This Month with Nim 26 January 2021 Jason Beetham

I will be starting a monthly blog post for community showcase entitled “This Month with Nim”.

This will be a method for developers in the Nim community to publish a small part of a blog post showing off what Nim is capable of and what people are working on. A brief example of what a post might look like is below.

January’s Month With Nim Discord Bot

Author: Jason Beetham

Hello everyone, my current project is a Discord bot that utilizes a DSL to create an easily extendible bot. This DSL generates an async procedure so you only have to write the body, reducing the repetitive task of matching a procedure signature. To add a command users just have to make a Nim file in the command folder then replicate the following code.

import command
command:
  name: hello
  description: "This command sends hello"
  body:
    discard await discord.api.sendMessage(discordMsg.channelID, "hello")

This automatically subscribes the command, and thanks to a macro all files in the command folder are imported so nothing else is required. If you care to check it out you can look here.

Want to see your project here next month?

Follow these instructions to add your project to the next month’s blog post.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4