Discord.js sending a message to a specific channel

You didn’t provide any code that you already tested so I will give you the code for your ready event that will work! client.on(‘ready’, client => { client.channels.get(‘CHANNEL ID’).send(‘Hello here!’); }) Be careful that your channel id a string. Let me know if it worked, thank you! 2020 Jun 13 Edit: A Discord.js update requires … Read more

Android sample bluetooth code to send a simple string via bluetooth

private OutputStream outputStream; private InputStream inStream; private void init() throws IOException { BluetoothAdapter blueAdapter = BluetoothAdapter.getDefaultAdapter(); if (blueAdapter != null) { if (blueAdapter.isEnabled()) { Set<BluetoothDevice> bondedDevices = blueAdapter.getBondedDevices(); if(bondedDevices.size() > 0) { Object[] devices = (Object []) bondedDevices.toArray(); BluetoothDevice device = (BluetoothDevice) devices[position]; ParcelUuid[] uuids = device.getUuids(); BluetoothSocket socket = device.createRfcommSocketToServiceRecord(uuids[0].getUuid()); socket.connect(); outputStream = socket.getOutputStream(); … Read more

Send HTML in email via PHP

It is pretty simple. Leave the images on the server and send the PHP + CSS to them… $to = ‘bob@example.com’; $subject=”Website Change Request”; $headers = “From: ” . strip_tags($_POST[‘req-email’]) . “\r\n”; $headers .= “Reply-To: ” . strip_tags($_POST[‘req-email’]) . “\r\n”; $headers .= “CC: susan@example.com\r\n”; $headers .= “MIME-Version: 1.0\r\n”; $headers .= “Content-Type: text/html; charset=UTF-8\r\n”; $message=”<p><strong>This is … Read more