GithubHelp home page GithubHelp logo

clyde's Introduction

NOTE: as of right now, this repo simply contains a clone of the original repl (https://repl.it/@discordbotlang/clyde)

Clyde

Clyde is a simple programming language that allows anyone, with no experience, to build a Discord bot. It is crafted to create a simple experience for those using it.

Join our discord server to test out a demo bot built using Clyde.

Note: this language is pretty simple and barebones for now. (WIP)

How To

Clyde can run and deploy your own bot within repl.it.

First off, clone this repl (fork or download).

To setup the discord bot,

  1. Open the discord developer portal.
  2. Create a new application.
  3. Add a bot to your discord application.
  4. Create a file named .env. This file will be hidden from the public.
  5. Copy the Bot's token, and paste into the .env file in the following format:
TOKEN=<Your token goes here>

To invite the bot to your server,

  1. Go to the OAuth2 tab
  2. Check the box labeled bot under scopes
  3. Under bot permissions, check all the boxes you need
  4. At the bottom of scopes, there will be a text box with a link
  5. Copy and paste the link into you browser.

You can edit your code in the main.clyde file. See tutorial for more info.

Tutorial

Writing code for your bot using Clyde is super simple.

To say something when a message is sent,

on "ping":
  say "pong"

Messages in Clyde are always surrounded by quotes. Say is currently the only command implemented.

You can have multiple events,

on "ping":
  say "pong"

on "What's up?":
  say "Hey!"

You can create variables within Clyde much like the simple syntax found within Python,

on "Hello":
  name = "Bob"
  say name

Sometimes, we want to say many things, in many commands,

on "Hello":
  say "hi"
  say "hello"

Or many things, in one command,

on "Hello":
  say "hi", "greetings", "good morning"

And sometimes, we just want one line,

on "Hello": say "hi", "greetings", "good morning"

We can also create complex bots, with these simple rules,

on "!ping":
  say "pong"

on "!info":
  say "Greetings. I am a demo bot to display the capabilities of Clyde."
  say "Written by Pranav Karthik and Liam Ilan."

on "!":
  say "please supply a command"
  
on "ping":
  say "You need to type !ping :)"

Conclusion

While building Clyde, we wanted to add numerous features which we unfortunately could not, due to the time restrictions. Some of those features include:

  • more commands
  • conditionals
  • embeds
  • arithmetic (and numbers)
  • lists
  • errors
  • discord-specific attributes (user, server, channel, etc.)

Demo

Join our discord server to test out a demo bot built using Clyde.

Credits

  • @discordsheep - Parser + Runtime
  • @Parzivox - Lexer + Runtime

clyde's People

Contributors

liam-ilan avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.