Giter Club home page Giter Club logo

code-jam-1's Introduction

Code Jam 1

This is the repository for all code relating to our first code jam, in March 2018. Participants should fork this repository, and submit their code in a pull request.

This code jam runs from the 23rd of March to the 25th of March, measured using the UTC timezone. Make sure you open your pull request by then. Once the deadline is up, stop pushing commits - we will not accept any submissions made after this date.

How To Participate

First things first - set up your repository. Read this guide on our site for information on how to set yourself up for a code jam. Remember, only one teammate needs to fork the repository - everyone else should be granted access to that fork as a contributor, so that they can work on it directly.

Make sure you have the following things installed:

  • Python 3.6 or later (installed with the PATH option enabled if you're on Windows)
  • Pip - make sure you can run pip in a terminal or command prompt
  • Pipenv - you can install this by running pip install pipenv in a terminal or command prompt
    • Like before, make sure you can run pipenv in a terminal or command prompt

Next up, set up your project with pipenv. We've compiled some documentation for you to read over if you get stuck - you can find it in the doc/ folder, and you absolutely should read all of it, and it will likely answer some of the questions that you have.

Use pipenv run run.py to start your project. You can press CTRL+C with the bot window selected to stop it.

Remember, if you need help, you can always ask on the server!

The Task

This month's theme is: Snakes.

For this code jam, your task will be to create a Snake cog for a Discord.py rewrite bot. You can find the documentation for Discord.py rewrite here. The best cog commands will be added to the official Python Discord bot and made available to everyone on the server. The overall best cog will be awarded custom Code Jam Champion roles, but the best commands from the teams who did not win will also be added to our bot, and any users who write something that ends up in the bot will be awarded Contributor roles on the server.

We have prepared some Discord.py rewrite boilerplate for you in this repo. Fork the repo and work in the file called snakes.py, in bot/cogs.

This means you won't have to write the basic bot itself, you'll just have to write the stuff that goes in the cog. For those of you with no discord.py experience, cogs are like little modules that the bot can load, and contain a class with methods that are hooked up to bot commands (like bot.tags.get). That way, when you type bot.snakes.get('python'), it will run the method inside the cog that corresponds to this command.

Your initial task will be to write get_snek. This is the minimum requirement for this contest, and everyone must do it. get_snek will be a method that goes online and fetches information about a snake. If you run it without providing an argument, it should fetch information about a random snake, including the name of the snake, a picture of the snake, and various information about it. Is it venomous? Where can it be found? What information you choose to get is up to you.

get_snek() should also take an optional argument name, which should be a string that contains the name of a snake. For example, if you do get_snek('cobra'), it should get information about a cobra. name should be case insensitive.

If get_snek('Python') is called, the method should instead return information about the programming language, but making sure to return the same type of information as for all the other snakes. Fill in this information in any way you want, try to have some fun with it.

The information should be returned as a dictionary, so that other methods in the Snake class can call it and make use of it.

Once you have finished get_snek(), you should make at least two bot commands. The first command, get(), should simply call get_snek() with whatever arguments the user provided, and then make a nice embed that it returns to Discord. For example, if the user in the Discord channel says bot.snakes.get('anaconda'), the bot should post an embed that shows a picture of an anaconda and some information about the snake.

The second command is entirely up to you. You can choose to use get_snek for this command as well, or you can come up with something entirely different. The only requirement is that it is snake related in some way or other. Here is your chance to be creative. It is these commands that will win or lose you this code jam. The best original ideas for these commands will probably walk away with the victory.

You are allowed to make as many additional commands as you want, but try to keep it a reasonable amount. The team that writes the most commands is not automatically going to win. One really excellent command is much better than 10 mediocre ones.


Have fun, and don't be afraid to ask for help in the usual places if you need it!

code-jam-1's People

Contributors

gdude2002 avatar

Stargazers

 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.