forked from lemon/uberbot
Implement dig command #4
Loading…
Reference in New Issue
There is no content yet.
Delete Branch "feat/dns_lookups"
Deleting a branch is permanent. Although the deleted branch may exist for a short time before cleaning up, in most cases it CANNOT be undone. Continue?
minor nitpicks, other than that looks good
@ -0,0 +14,4 @@
pub fn new(server: Option<String>) -> anyhow::Result<Self> {
let resolver = if let Some(server) = server {
let mut resolver_config = ResolverConfig::new();
let nserver = format!("{server}:53").parse().expect("Failed to parse DNS server address");
why not return the error here instead of unwrapping? this function returns an anyhow::Result
@ -0,0 +29,4 @@
async fn execute(&self, msg: CommandContext) -> anyhow::Result<String> {
if let Some(msg) = msg.content {
let mut builder = String::new();
let parts = msg.split_ascii_whitespace().collect::<Vec<&str>>();
I don't see why you'd use turbofish here, it will look better if you just specify the type explicitly.