This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sqlite3 | |
sql_config = sqlite3.connect('Tunes.db') | |
sql_con = sql_config.cursor() | |
sql_con.execute("CREATE TABLE IF NOT EXISTS 'temp' (Title TEXT, Length TEXT)") # Create temp table | |
sql_con.execute("DELETE FROM 'temp'") # Clean temp | |
# sql_con.execute("vacuum") # Commit clea | |
sql_con.execute("INSERT INTO 'temp' SELECT * FROM Tunes") # Copy Data to temp | |
sql_con.execute("DELETE FROM 'Tunes'") # Clean Tunes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import os.path | |
import praw | |
# bot login credentials | |
username = '' | |
password = '' | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright (C) 2020 Edin Demic @MrEdinLaw - All Rights Reserved | |
# You may use, and modify this code but not distribute | |
import praw | |
import re | |
from time import sleep | |
# REST API connection | |
reddit = praw.Reddit(client_id="", | |
client_secret="", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def submissions_and_comments(subreddit, **kwargs): | |
results = [] | |
results.extend(subreddit.new(**kwargs)) | |
results.extend(subreddit.comments(**kwargs)) | |
results.sort(key=lambda post: post.created_utc, reverse=True) | |
return results | |
subreddit = r.subreddit('redditdev') | |
stream = praw.models.util.stream_generator(lambda **kwargs: submissions_and_comments(subreddit, **kwargs)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import nextcord | |
from nextcord.ext import commands | |
BOT_TOKEN = "your_bot_token_here" | |
SPECIFIC_ROLE_ID_IN_SERVER_A = 1219228201667133470 | |
ROLE_ID_IN_SERVER_B = 1219228524401917953 | |
SERVER_A_ID = 1219228133727801384 | |
SERVER_B_ID = 1219228491246211103 | |
SERVER_A_CHANNEL = 1219228133727801387 | |
SERVER_B_CHANNEL = 1219228491694870559 |