Skip to content

Instantly share code, notes, and snippets.

View izxxr's full-sized avatar

Izhar Ahmad izxxr

View GitHub Profile
@izxxr
izxxr / Github Webhook Tutorial.md
Created February 27, 2021 17:08 — forked from jagrosh/Github Webhook Tutorial.md
Simple Github -> Discord webhook

Step 1 - Make a Discord Webhook

  1. Find the Discord channel in which you would like to send commits and other updates

  2. In the settings for that channel, find the Webhooks option and create a new webhook. Note: Do NOT give this URL out to the public. Anyone or service can post messages to this channel, without even needing to be in the server. Keep it safe! WebhookDiscord

Step 2 - Set up the webhook on Github

  1. Navigate to your repository on Github, and open the Settings Settings
@izxxr
izxxr / eval.py
Created March 1, 2021 14:38 — forked from simmsb/eval.py
A good eval for discord.py
import ast
import discord
from discord.ext import commands
def insert_returns(body):
# insert return stmt if the last expression is a expression statement
if isinstance(body[-1], ast.Expr):
body[-1] = ast.Return(body[-1].value)