You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 2, 2022. It is now read-only.
function getSettings($channelid, $guildid, $name = "", $parent_id = null) {
global $conn;
/* We can be sure that channelid is always numeric, this is safe */
$q = mysqli_query($conn, "SELECT settings FROM infobot_discord_settings WHERE id = '" . $channelid . "'");
$obj = mysqli_fetch_object($q);
if ($parent_id == null) {
$parent_id = "NULL";
}
if ($obj) {
if ($name != "") {
mysqli_query($conn, "UPDATE infobot_discord_settings SET name = '".mysqli_real_escape_string($conn, $name)."', parent_id = $parent_id WHERE id = $channelid");
}
return json_decode($obj->settings, true);
} else {
mysqli_query($conn, "INSERT INTO infobot_discord_settings (id,guild_id,settings) VALUES($channelid,$guildid,'{}')");
if ($name != "") {
mysqli_query($conn, "UPDATE infobot_discord_settings SET name = '".mysqli_real_escape_string($conn, $name)."', parent_id = $parent_id WHERE id = $channelid");
}
return [];
}
}
function getSetting($channelid, $guildid, $field) {