Skip to content

Instantly share code, notes, and snippets.

View bug
Exception ignored in: <_io.FileIO name=3 mode='rb' closefd=True>
ResourceWarning: unclosed file <_io.TextIOWrapper name=3 encoding='cp1252'>
Exception ignored in: <bound method Popen.__del__ of <subprocess.Popen object at 0x0000020DFF6727F0>>
Traceback (most recent call last):
File "E:\Miniconda3\lib\subprocess.py", line 766, in __del__
ResourceWarning, source=self)
ResourceWarning: subprocess 15968 is still running
Sakura Bot is ready
Ignoring exception in on_message
Traceback (most recent call last):
View discord_delete_your_messages_from_channel.pyl
"""
1. your username is what you use, your full username including the #id can be found by clicking your name
2. authentification token can be found by going to discord on chrome (or other browsers), press F12, go to network tab, headers tab,
under request headers there is an "authetification", copy that.
3. Right click a channel and click copy id, paste it in the script
"""
import json, requests, sys
print ("Delete all messages from specific channel")
# Fill the following information
View TestClass.py
class TestClass:
def __init__(self, someString):
self.someString = someString # an instance variable
def test():
print('Test')
# uppon creating an instance of TestClass called obj0
# the special function __init__ is called
# in this function obj0 is passed as an argument named self
View simple-example-class-car.py
class Car:
numberOfCars = 0
def __init__(self, color, brand, model):
self.color = color
self.brand = brand
self.model = model
self.engine = 'off'
Car.numberOfCars += 1
def startEngine(self):
View class-simple-example.py
class Human:
def __init__(self, name, age, powerLevel):
self.name = name
self.age = age
def sayHello(self):
print('hello, my name is', self.name)
View Fortnite stats 1.3 h.gs
// This spreadsheet can be used to visualize your forntite statistics, as you play games the data will be automatically updated.
// Add any number of usernames to the "fortniteUsernames" array and add main() as a time-driven trigger (5 minutes would be a good interval).
var fortniteUsernames = ['silver_0_wins', 'rnzop_yt']; // add ass many usernames as you want here, note limited to 2000 api calls per day
// Get an api key by direct messaging @Fortnite Stats on discord, with the message !getapikey visit https://fortnite.y3n.co/ for more details
var key = 'yourAPIkey';
// Everything else will be set up automatically.
// if the servers status changes emails will be sent to these addresses, you can add as many as you want
var emailAddresses = ['yourEmailHere']; // empty if you don't wanna send emails when fortnite servers change status
View fortnite google sheet stats overlap v1.2.js
/**
* @OnlyCurrentDoc
*/
// setup
var usernameP1 = 'first username goes here';
var usernameP2 = 'second username goes here';
var sheetMode = 'duo'; // available modes: 'solo', 'duo', 'all' or 'squads'
// get an api key by direct messaging @Fortnite Stats on discord, with the message !getapikey visit https://fortnite.y3n.co/ for more details
var key = 'your key goes here';
View fortnite google sheet stats v1.1.js
/**
* @OnlyCurrentDoc
*/
// this script is intended for the google apps script for google spreadsheets, tools>script editor, copy paste the code after you make
// the propper adjustments, such as getting an api key and inserting your username, see details at https://fortnite.y3n.co/
var triggerColumn = 2;
var triggerRow = 3;
var timestampColumn = 'I';
View fortnite stats v1.1.js
/**
* @OnlyCurrentDoc
*/
var triggerColumn = 2;
var triggerRow = 3;
var timestampColumn = 'I';
var username = 'silver_0_wins';
var sheetMode = 'solo'; // available modes: 'solo', 'duo', 'all' or 'squads'
View fortnite stats v1.js
/**
* @OnlyCurrentDoc
*/
var username = 'your fortnite username here';
var sheetMode = 'solo'; // available modes: 'solo', 'duo', 'all' or 'squads'
// get an api key by direct messaging @Fortnite Stats on discord, with the message !getapikey visit https://fortnite.y3n.co/ for more details
var key = 'your api key here';