Cleaned up repo and separated both bots into their respective folders
This commit is contained in:
		
							parent
							
								
									5414de60ca
								
							
						
					
					
						commit
						a9fda1fcb7
					
				
					 3134 changed files with 382980 additions and 31 deletions
				
			
		
							
								
								
									
										15
									
								
								sidBot-js/node_modules/data-uri-to-buffer/dist/src/index.d.ts
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								sidBot-js/node_modules/data-uri-to-buffer/dist/src/index.d.ts
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,15 @@
 | 
			
		|||
/// <reference types="node" />
 | 
			
		||||
export interface MimeBuffer extends Buffer {
 | 
			
		||||
    type: string;
 | 
			
		||||
    typeFull: string;
 | 
			
		||||
    charset: string;
 | 
			
		||||
}
 | 
			
		||||
/**
 | 
			
		||||
 * Returns a `Buffer` instance from the given data URI `uri`.
 | 
			
		||||
 *
 | 
			
		||||
 * @param {String} uri Data URI to turn into a Buffer instance
 | 
			
		||||
 * @returns {Buffer} Buffer instance from Data URI
 | 
			
		||||
 * @api public
 | 
			
		||||
 */
 | 
			
		||||
export declare function dataUriToBuffer(uri: string): MimeBuffer;
 | 
			
		||||
export default dataUriToBuffer;
 | 
			
		||||
							
								
								
									
										53
									
								
								sidBot-js/node_modules/data-uri-to-buffer/dist/src/index.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										53
									
								
								sidBot-js/node_modules/data-uri-to-buffer/dist/src/index.js
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,53 @@
 | 
			
		|||
/**
 | 
			
		||||
 * Returns a `Buffer` instance from the given data URI `uri`.
 | 
			
		||||
 *
 | 
			
		||||
 * @param {String} uri Data URI to turn into a Buffer instance
 | 
			
		||||
 * @returns {Buffer} Buffer instance from Data URI
 | 
			
		||||
 * @api public
 | 
			
		||||
 */
 | 
			
		||||
export function dataUriToBuffer(uri) {
 | 
			
		||||
    if (!/^data:/i.test(uri)) {
 | 
			
		||||
        throw new TypeError('`uri` does not appear to be a Data URI (must begin with "data:")');
 | 
			
		||||
    }
 | 
			
		||||
    // strip newlines
 | 
			
		||||
    uri = uri.replace(/\r?\n/g, '');
 | 
			
		||||
    // split the URI up into the "metadata" and the "data" portions
 | 
			
		||||
    const firstComma = uri.indexOf(',');
 | 
			
		||||
    if (firstComma === -1 || firstComma <= 4) {
 | 
			
		||||
        throw new TypeError('malformed data: URI');
 | 
			
		||||
    }
 | 
			
		||||
    // remove the "data:" scheme and parse the metadata
 | 
			
		||||
    const meta = uri.substring(5, firstComma).split(';');
 | 
			
		||||
    let charset = '';
 | 
			
		||||
    let base64 = false;
 | 
			
		||||
    const type = meta[0] || 'text/plain';
 | 
			
		||||
    let typeFull = type;
 | 
			
		||||
    for (let i = 1; i < meta.length; i++) {
 | 
			
		||||
        if (meta[i] === 'base64') {
 | 
			
		||||
            base64 = true;
 | 
			
		||||
        }
 | 
			
		||||
        else {
 | 
			
		||||
            typeFull += `;${meta[i]}`;
 | 
			
		||||
            if (meta[i].indexOf('charset=') === 0) {
 | 
			
		||||
                charset = meta[i].substring(8);
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
    // defaults to US-ASCII only if type is not provided
 | 
			
		||||
    if (!meta[0] && !charset.length) {
 | 
			
		||||
        typeFull += ';charset=US-ASCII';
 | 
			
		||||
        charset = 'US-ASCII';
 | 
			
		||||
    }
 | 
			
		||||
    // get the encoded data portion and decode URI-encoded chars
 | 
			
		||||
    const encoding = base64 ? 'base64' : 'ascii';
 | 
			
		||||
    const data = unescape(uri.substring(firstComma + 1));
 | 
			
		||||
    const buffer = Buffer.from(data, encoding);
 | 
			
		||||
    // set `.type` and `.typeFull` properties to MIME type
 | 
			
		||||
    buffer.type = type;
 | 
			
		||||
    buffer.typeFull = typeFull;
 | 
			
		||||
    // set the `.charset` property
 | 
			
		||||
    buffer.charset = charset;
 | 
			
		||||
    return buffer;
 | 
			
		||||
}
 | 
			
		||||
export default dataUriToBuffer;
 | 
			
		||||
//# sourceMappingURL=index.js.map
 | 
			
		||||
							
								
								
									
										1
									
								
								sidBot-js/node_modules/data-uri-to-buffer/dist/src/index.js.map
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								sidBot-js/node_modules/data-uri-to-buffer/dist/src/index.js.map
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1 @@
 | 
			
		|||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAMA;;;;;;GAMG;AACH,MAAM,UAAU,eAAe,CAAC,GAAW;IAC1C,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE;QACzB,MAAM,IAAI,SAAS,CAClB,kEAAkE,CAClE,CAAC;KACF;IAED,iBAAiB;IACjB,GAAG,GAAG,GAAG,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;IAEhC,+DAA+D;IAC/D,MAAM,UAAU,GAAG,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACpC,IAAI,UAAU,KAAK,CAAC,CAAC,IAAI,UAAU,IAAI,CAAC,EAAE;QACzC,MAAM,IAAI,SAAS,CAAC,qBAAqB,CAAC,CAAC;KAC3C;IAED,mDAAmD;IACnD,MAAM,IAAI,GAAG,GAAG,CAAC,SAAS,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAErD,IAAI,OAAO,GAAG,EAAE,CAAC;IACjB,IAAI,MAAM,GAAG,KAAK,CAAC;IACnB,MAAM,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,YAAY,CAAC;IACrC,IAAI,QAAQ,GAAG,IAAI,CAAC;IACpB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,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